[molecule] catch KeyboardInterrupt by running kill phase in while loop

This commit is contained in:
Fabio Erculiani
2010-08-02 10:04:22 +02:00
parent 570ab977d1
commit 70b531fee9
+7 -3
View File
@@ -53,11 +53,15 @@ for el in molecule_data_order:
try:
rc = my.run()
except KeyboardInterrupt:
while True:
my.kill()
kill_pids()
break
raise SystemExit(1)
while True:
my.kill()
kill_pids()
raise SystemExit(1)
my.kill()
kill_pids()
break
if rc != 0:
raise SystemExit(rc)
raise SystemExit(0)