]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tools/check-includes: compat with Python 3.7
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 7 May 2023 09:01:33 +0000 (11:01 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 9 May 2023 06:11:10 +0000 (08:11 +0200)
I thought that 3.8 is enough. But Centos8 CI chokes on the walrus.

tools/check-includes.py

index abca2882f0b5894d6672dd19ad77e9c374ae9839..afb957a2e12eb75bc6b52f3d2c429347520f2a88 100755 (executable)
@@ -14,7 +14,8 @@ def check_file(filename):
     seen = set()
     good = True
     for n, line in enumerate(open(filename)):
-        if m := re.match(r'^\s*#\s*include\s*[<"](\S*)[>"]', line):
+        m = re.match(r'^\s*#\s*include\s*[<"](\S*)[>"]', line)
+        if m:
             include = m.group(1)
             if include in seen:
                 try: