]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Use return value of finalize_value() in one more place
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 7 Jul 2024 13:39:13 +0000 (15:39 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 7 Jul 2024 15:23:13 +0000 (17:23 +0200)
Doesn't change behavior, just slightly easier to read.

mkosi/config.py

index 68b553c3cddf52e4dc0ca237e578d018cf38ba8c..b0c5cbe7fd824e521dbe57f90b50de32b4cdddbb 100644 (file)
@@ -3474,10 +3474,10 @@ def parse_config(argv: Sequence[str] = (), *, resources: Path = Path("/")) -> tu
 
                 # If we encounter a setting that has not been explicitly configured yet, we assign the default value
                 # first so that we can match on default values for settings.
-                if finalize_value(s) is None:
+                if (value := finalize_value(s)) is None:
                     result = False
                 else:
-                    result = s.match(v, getattr(namespace, s.dest))
+                    result = s.match(v, value)
 
             elif m := MATCH_LOOKUP.get(k):
                 result = m.match(v)