summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-includes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/check-includes.py b/tools/check-includes.py
index abca2882f0..afb957a2e1 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: