aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-05-04 19:10:36 -0700
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-05-04 19:10:36 -0700
commitb5658e406e763faece1af969f864f1a4ac7b6d43 (patch)
treeeca758128d43dad9fbd0816343ca3b7b78f641ed /tools
parentbc2afb065a79bf7d137a5c3b13e8821fc84ee832 (diff)
parentc74f62bcfcabd8b7468bcca16dda28a29b377877 (diff)
Merge pull request #6333 from dgquintas/check_includes_moar_fixes
Don't try to read files that have been moved/renamed.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/distrib/check_include_guards.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py
index 897a899e7e..6c160c64b6 100755
--- a/tools/distrib/check_include_guards.py
+++ b/tools/distrib/check_include_guards.py
@@ -31,6 +31,7 @@
import argparse
import os
+import os.path
import re
import sys
import subprocess
@@ -187,6 +188,8 @@ filename_list = []
try:
filename_list = subprocess.check_output(FILE_LIST_COMMAND,
shell=True).splitlines()
+ # Filter out non-existent files (ie, file removed or renamed)
+ filename_list = (f for f in filename_list if os.path.isfile(f))
except subprocess.CalledProcessError:
sys.exit(0)