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.
This commit is contained in:
parent
6f34800884
commit
1b723937e3
|
@ -58,7 +58,8 @@ def process_file(f):
|
||||||
elif args.mode == _MODE_COMPRESS:
|
elif args.mode == _MODE_COMPRESS:
|
||||||
output.append(match)
|
output.append(match)
|
||||||
|
|
||||||
write_out(last_fname, output)
|
if last_fname:
|
||||||
|
write_out(last_fname, output)
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue