From 8fff48ed7bea6b90df2bbb587c12c39d9e6782fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 5 Mar 2015 18:33:46 +0100 Subject: [PATCH] htmlreport: don't just hang if --file is not specified. Print a warning and exit. --- htmlreport/cppcheck-htmlreport | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htmlreport/cppcheck-htmlreport b/htmlreport/cppcheck-htmlreport index c90d47373..2efa1770f 100755 --- a/htmlreport/cppcheck-htmlreport +++ b/htmlreport/cppcheck-htmlreport @@ -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.')