mickael9 committed cedd61c

- Make SIGINT terminate the program cleanly
- Fix a small progress display issue (race condition)

Comments (0)

Files changed (1)

 import sys, os, os.path
 import argparse
+import signal
 from gett import *
 from time import sleep
+signal.signal(signal.SIGINT, signal.SIG_DFL)
 home = os.getenv('USERPROFILE') or os.getenv('HOME')
 parser = argparse.ArgumentParser(description="A simple uploader")
 args = parser.parse_args()
 user = User()
     # Try to log-in with the token
         if not upload.is_alive():
+            print_status(upload)
             if upload.ex:
                 sys.stderr.write(('\rError uploading %s : %s' % (, upload.ex)).ljust(80))