Try to handle keyboard interrupts

This commit is contained in:
Matt Martz 2013-01-25 11:53:57 -06:00
parent 2b0d1f6446
commit e67ee1663c
2 changed files with 8 additions and 2 deletions

View File

@ -371,6 +371,9 @@ def speedtest():
resultid[0]) resultid[0])
if __name__ == '__main__': if __name__ == '__main__':
try:
speedtest() speedtest()
except KeyboardInterrupt:
print '\nCancelling...'
# vim:ts=4:sw=4:expandtab # vim:ts=4:sw=4:expandtab

View File

@ -349,6 +349,9 @@ def speedtest():
resultid[0].decode()) resultid[0].decode())
if __name__ == '__main__': if __name__ == '__main__':
try:
speedtest() speedtest()
except KeyboardInterrupt:
print('\nCancelling...')
# vim:ts=2:sw=2:expandtab # vim:ts=2:sw=2:expandtab