Commit 1b723937 authored by stijn's avatar stijn Committed by Damien George

py/makeqstrdefs.py: Fix beaviour when scanning non-C preprocessed files.

When process_file() is passed a preprocessed C++ file for instance it won't
find any lines containing .c files and the last_fname variable remains
None, so handle that gracefully.
parent 6f348008
......@@ -58,7 +58,8 @@ def process_file(f):
elif args.mode == _MODE_COMPRESS:
output.append(match)
write_out(last_fname, output)
if last_fname:
write_out(last_fname, output)
return ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment