]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Move one_zero() to util.py
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 5 Aug 2023 16:22:27 +0000 (18:22 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 5 Aug 2023 16:22:27 +0000 (18:22 +0200)
mkosi/__init__.py
mkosi/util.py

index 2bd8a4950c3f343ed5c06303c83a2a9e63e7b134..916c3e4006d528be2265586251bbd777e6bcde09 100644 (file)
@@ -50,6 +50,7 @@ from mkosi.util import (
     flatten,
     format_bytes,
     format_rlimit,
+    one_zero,
     scopedenv,
     try_import,
 )
@@ -1667,10 +1668,6 @@ def build_image(args: MkosiArgs, config: MkosiConfig) -> None:
     print_output_size(config.output_dir / config.output)
 
 
-def one_zero(b: bool) -> str:
-    return "1" if b else "0"
-
-
 def setfacl(root: Path, uid: int, allow: bool) -> None:
     run(["setfacl",
          "--physical",
index 1ac16af2bbb5490b7dfb279118bb65bd6674adae..c52bf44ea3f9a05df3faa2dd9af0a002d2e10f91 100644 (file)
@@ -225,3 +225,7 @@ def tar_binary() -> str:
     # support in BSD tar and the different command line syntax
     # compared to GNU tar.
     return "gtar" if shutil.which("gtar") else "tar"
+
+
+def one_zero(b: bool) -> str:
+    return "1" if b else "0"