]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Allow always/never as booleans for backward compat
authorLuca Boccassi <bluca@debian.org>
Sun, 2 Jul 2023 23:08:07 +0000 (00:08 +0100)
committerLuca Boccassi <bluca@debian.org>
Mon, 3 Jul 2023 22:52:47 +0000 (23:52 +0100)
Avoid breaking --with-network=never

mkosi/config.py

index 5f6263bd69aefeb9447e713d3c2e2c716cb4d045..5f180a4e972515ce10be2636ed3b19b760130dd4 100644 (file)
@@ -73,10 +73,10 @@ class SecureBootSignTool(enum.Enum):
 def parse_boolean(s: str) -> bool:
     "Parse 1/true/yes/y/t/on as true and 0/false/no/n/f/off/None as false"
     s_l = s.lower()
-    if s_l in {"1", "true", "yes", "y", "t", "on"}:
+    if s_l in {"1", "true", "yes", "y", "t", "on", "always"}:
         return True
 
-    if s_l in {"0", "false", "no", "n", "f", "off"}:
+    if s_l in {"0", "false", "no", "n", "f", "off", "never"}:
         return False
 
     die(f"Invalid boolean literal: {s!r}")