]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
sandbox: fix wrong errno passed to OSError()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Dec 2025 16:25:58 +0000 (01:25 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 17 Dec 2025 17:07:23 +0000 (18:07 +0100)
mkosi/sandbox.py

index d6dace86e11ecaa421c91b13d3e69623b17e4065..7337b59fb0c317c136ed7d41f28dff48e5137cba 100755 (executable)
@@ -168,7 +168,7 @@ def oserror(syscall: str, filename: str = "", errno: int = 0) -> None:
     if errno == ENOSYS and is_main():
         print(ENOSYS_MSG.format(syscall=syscall, kver=os.uname().version), file=sys.stderr)
 
-    raise OSError(ctypes.get_errno(), os.strerror(errno), filename or None)
+    raise OSError(errno, os.strerror(errno), filename or None)
 
 
 def unshare(flags: int) -> None: