scripts/coverage.py: s/exit/sys.exit/
the former is supposed to be used in "the interactive interpreter shell and should not be used in programs.". this function prints out its argument, and the exit code is 1. so just print the error message using sys.exit() see also https://docs.python.org/3/library/sys.html#sys.exit and https://docs.python.org/3/library/constants.html#exit Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
@@ -134,8 +134,7 @@ def generate_coverage_report(path="build/coverage/test", name="tests", input_fil
|
||||
maybe_print(f"Found {len(profraw_files)} input files")
|
||||
|
||||
if not profraw_files:
|
||||
print("Error: couldn't find any raw profiling data files, can't generate coverage report")
|
||||
exit(1)
|
||||
sys.exit("Error: couldn't find any raw profiling data files, can't generate coverage report")
|
||||
|
||||
profdata_path = os.path.join(path, f"{name}.profdata")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user