Quellcode durchsuchen

new except block for subprocess and os error seem to be working

Shawn Bandy vor 12 Jahren
Ursprung
Commit
a47796138d
1 geänderte Dateien mit 8 neuen und 0 gelöschten Zeilen
  1. 8 0
      toolset/benchmark/benchmarker.py

+ 8 - 0
toolset/benchmark/benchmarker.py

@@ -449,6 +449,14 @@ class Benchmarker:
           Subprocess Error {name}
         -----------------------------------------------------
         """.format(name=test.name))
+        try:
+          test.stop()
+        except (subprocess.CalledProcess):
+          print textwrap.dedent("""
+        -----------------------------------------------------
+          Subprocess Error: Test .stop() raised exception {name}
+        -----------------------------------------------------
+        """.format(name=test.name))
       except (KeyboardInterrupt, SystemExit):
         #pickle.dump(runattempts, 'run_attempts.pickle')
         #runattempts_file.close()