tools/check-includes: compat with Python 3.7

I thought that 3.8 is enough. But Centos8 CI chokes on the walrus.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-05-07 11:01:33 +02:00
parent dcbbc7cef5
commit e76ff43236

View file

@ -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: