Do not crash Python script when users cancel

This commit is contained in:
nsubiron 2019-07-02 10:58:29 +02:00 committed by Néstor Subirón
parent 33e8f2536a
commit 416851bf99
1 changed files with 6 additions and 1 deletions

View File

@ -197,4 +197,9 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
main() try:
main()
except KeyboardInterrupt:
print('\nCancelled by user. Bye!')