]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "check-os-release.py compatible with Python < 3.8" 40711/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Feb 2026 11:40:55 +0000 (20:40 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Feb 2026 09:47:15 +0000 (18:47 +0900)
This reverts commit ce0a056abc41168e1b45537505ca9f65bf6f5c30.

man/check-os-release.py

index 19b193ec76a517138265f7de5c7da5a049b07782..f0a64f349662a120b85a90d4c0bde176a4953327 100755 (executable)
@@ -17,8 +17,7 @@ def read_os_release():
         line = line.rstrip()
         if not line or line.startswith('#'):
             continue
-        m = re.match(r'([A-Z][A-Z_0-9]+)=(.*)', line)
-        if m:
+        if m := re.match(r'([A-Z][A-Z_0-9]+)=(.*)', line):
             name, val = m.groups()
             if val and val[0] in '"\'':
                 val = ast.literal_eval(val)