Make sure the duration timer is always canceled
This fixes freeze upon hitting ctrl-c during execution.
@@ -270,6 +270,7 @@ class Common(object):
process.kill()
process.returncode = PROCESS_TIMEOUT
+ try:
# Start the timer
timer = Timer(timeout, kill)
timer.start()
@@ -292,6 +293,7 @@ class Common(object):
if line != '':
log('err', line.rstrip('\n'), 'yellow', level=3)
+ finally:
# Cancel the timer
timer.cancel()
