Browse Source

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

Shawn Bandy 12 years ago
parent
commit
a47796138d
1 changed files with 8 additions and 0 deletions
  1. 8 0
      toolset/benchmark/benchmarker.py

+ 8 - 0
toolset/benchmark/benchmarker.py

@@ -449,6 +449,14 @@ class Benchmarker:
           Subprocess Error {name}
           Subprocess Error {name}
         -----------------------------------------------------
         -----------------------------------------------------
         """.format(name=test.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):
       except (KeyboardInterrupt, SystemExit):
         #pickle.dump(runattempts, 'run_attempts.pickle')
         #pickle.dump(runattempts, 'run_attempts.pickle')
         #runattempts_file.close()
         #runattempts_file.close()