From 51aac10f6ad30a787b34e61ae43d1ec4336691e6 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Mon, 22 Jan 2024 17:55:37 +0100 Subject: provide default for IDAllocation.allocation map arg target Most frequently, the root user is allocated. --- linuxnamespaces/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linuxnamespaces/__init__.py') 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. -- cgit v1.2.3