Skip to content

Commit

Permalink
change script to exit without error code
Browse files Browse the repository at this point in the history
  • Loading branch information
AmintorDusko committed Nov 9, 2023
1 parent 30b6429 commit 70edc62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/benchmarks/convert_pytest_JSON_to_XUBM.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ def create_benchmark_XUBM(data, args):
parsed_args = parse_args()

if os.stat(parsed_args.filename).st_size == 0:
raise IOError(parsed_args.filename+f" is empty.")
print(parsed_args.filename+" is empty. Interrupting program.")
exit(0)

Check notice on line 86 in scripts/benchmarks/convert_pytest_JSON_to_XUBM.py

View check run for this annotation

codefactor.io / CodeFactor

scripts/benchmarks/convert_pytest_JSON_to_XUBM.py#L86

Consider using 'sys.exit' instead (consider-using-sys-exit)

with open(parsed_args.filename, 'r', encoding="utf-8") as file:
pytest_data = json.load(file)
Expand Down

0 comments on commit 70edc62

Please sign in to comment.