htmlreport: don't just hang if --file is not specified. Print a warning and exit.

This commit is contained in:
Matthias Krüger 2015-03-05 18:33:46 +01:00
parent fad50de311
commit 8fff48ed7b
1 changed files with 2 additions and 0 deletions

View File

@ -384,6 +384,8 @@ if __name__ == '__main__':
if not os.path.exists(options.file):
parser.error('cppcheck xml file: %s not found.' % options.file)
input_file = io.open(options.file, 'r')
else:
parser.error('No cppcheck xml file specified. (--file=)')
# Parse the xml file and produce a simple list of errors.
print('Parsing xml report.')