Bug 1506928 - [mozharness] Handle KeyboardInterrupt in ScriptMixin. r=gbrown

Differential Revision: https://phabricator.services.mozilla.com/D25749

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Henrik Skupin 2019-04-24 09:30:41 +00:00
parent ad11770681
commit bb5a8b1846

View File

@ -1456,6 +1456,14 @@ class ScriptMixin(PlatformMixin):
break
parser.add_lines(line)
returncode = p.returncode
except KeyboardInterrupt:
level = error_level
if halt_on_failure:
level = FATAL
self.log("Process interrupted by the user, killing process with pid %s" % p.pid,
level=level)
p.kill()
return -1
except OSError, e:
level = error_level
if halt_on_failure: