summaryrefslogtreecommitdiff
path: root/linuxnamespaces
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2024-01-22 17:55:37 +0100
committerHelmut Grohne <helmut@subdivi.de>2024-01-22 17:55:37 +0100
commit51aac10f6ad30a787b34e61ae43d1ec4336691e6 (patch)
treea075393cb82ff829b8bb41bad88bde47233393f0 /linuxnamespaces
parentec0be44f5e34ed76f7f6f2eeb530682f2b096212 (diff)
downloadpython-linuxnamespaces-51aac10f6ad30a787b34e61ae43d1ec4336691e6.tar.gz
provide default for IDAllocation.allocation map arg target
Most frequently, the root user is allocated.
Diffstat (limited to 'linuxnamespaces')
-rw-r--r--linuxnamespaces/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/linuxnamespaces/__init__.py b/linuxnamespaces/__init__.py
index 5d810b0..f44220a 100644
--- a/linuxnamespaces/__init__.py
+++ b/linuxnamespaces/__init__.py
@@ -126,7 +126,7 @@ class IDAllocation:
return start
raise ValueError("could not satisfy allocation request")
- def allocatemap(self, count: int, target: int) -> IDMapping:
+ def allocatemap(self, count: int, target: int = 0) -> IDMapping:
"""Allocate count contiguous ids from this allocation. An IDMapping
with its innerstart set to target is returned. The allocation is
removed from this IDAllocation object.