diff --git a/scripts/benchmark.py b/scripts/benchmark.py index 7c6f3c0..366ab31 100644 --- a/scripts/benchmark.py +++ b/scripts/benchmark.py @@ -1,9 +1,8 @@ # list all folders in benchmark folder # for each folder, run the benchmark - +import contextlib import os import subprocess -import sys from itertools import islice from pathlib import Path @@ -60,7 +59,7 @@ def main( print(f.read()) print() - try: + with contextlib.suppress(KeyboardInterrupt): subprocess.run( [ "python", @@ -71,8 +70,6 @@ def main( "evaluate", ], ) - except KeyboardInterrupt: - sys.exit(1) if __name__ == "__main__":