This repository was archived by the owner on Jan 1, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def parse_cppcheck(file_name):
5656 Dict[str, List[CppcheckError]]: Parsed errors grouped by file name.
5757
5858 Raises:
59- FileNotFoundError : If file_name does not exist.
59+ IOError : If file_name does not exist (More specifically, FileNotFoundError on Python 3) .
6060 xml.etree.ElementTree.ParseError: If file_name is not a valid XML file.
6161 ValueError: If unsupported Cppcheck XML version.
6262 """
@@ -129,7 +129,7 @@ def main():
129129 except ValueError as e :
130130 print (str (e ))
131131 return EXIT_FAILURE
132- except FileNotFoundError as e :
132+ except IOError as e :
133133 print (str (e ))
134134 return EXIT_FAILURE
135135 except ElementTree .ParseError as e :
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ def test_xml_version_1(self):
5757 parse_cppcheck ('tests/cppcheck-out-bad-xml-version-1.xml' )
5858
5959 def test_file_not_found (self ):
60- with self .assertRaises (FileNotFoundError ):
60+ with self .assertRaises (IOError ):
6161 parse_cppcheck ('tests/file_does_not_exist.xml' )
6262
6363 def test_malformed (self ):
You can’t perform that action at this time.
0 commit comments