mirror of https://gerrit.osmocom.org/osmo-ci
scripts/verify_log_statements.py: on parse error, print file
If string eval encounters an uncovered parse error, it's useful to know which file it happened in. Change-Id: I5fe9a3bbdbfb8a995f24596bf09e70ca5bb3fe8a
This commit is contained in:
parent
6475204b4c
commit
e83f8a4737
|
@ -63,6 +63,7 @@ def check_file(f):
|
|||
if not (f.endswith('.h') or f.endswith('.c') or f.endswith('.cpp')):
|
||||
return []
|
||||
|
||||
try:
|
||||
errors_found = []
|
||||
|
||||
file_content = codecs.open(f, "r", "utf-8").read()
|
||||
|
@ -115,7 +116,9 @@ def check_file(f):
|
|||
r.line = line
|
||||
|
||||
return errors_found
|
||||
|
||||
except:
|
||||
print("ERROR WHILE PROCESSING %r" % f, file=sys.stderr)
|
||||
raise
|
||||
|
||||
all_errors_found = []
|
||||
for f in args:
|
||||
|
|
Loading…
Reference in New Issue