Fix KeyboardInterrupt signal for Python 2
This commit is contained in:
parent
667ab50199
commit
60765d38d0
1 changed files with 4 additions and 1 deletions
|
@ -782,7 +782,10 @@ def main(argv=None):
|
|||
raise
|
||||
sys.stderr.write('\n')
|
||||
tty.error("Keyboard interrupt.")
|
||||
return signal.SIGINT.value
|
||||
if sys.version_info >= (3, 5):
|
||||
return signal.SIGINT.value
|
||||
else:
|
||||
return signal.SIGINT
|
||||
|
||||
except SystemExit as e:
|
||||
if spack.config.get('config:debug'):
|
||||
|
|
Loading…
Reference in a new issue