From: Zbigniew Jędrzejewski-Szmek Date: Sun, 7 May 2023 09:01:33 +0000 (+0200) Subject: tools/check-includes: compat with Python 3.7 X-Git-Tag: v254-rc1~529^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e76ff43236b62240b04a43679c5bb5db58a407cf;p=thirdparty%2Fsystemd.git tools/check-includes: compat with Python 3.7 I thought that 3.8 is enough. But Centos8 CI chokes on the walrus. --- diff --git a/tools/check-includes.py b/tools/check-includes.py index abca2882f0b..afb957a2e12 100755 --- a/tools/check-includes.py +++ b/tools/check-includes.py @@ -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: