diff --git a/ox/api.py b/ox/api.py index da0d5ab..2cbc641 100644 --- a/ox/api.py +++ b/ox/api.py @@ -183,7 +183,10 @@ class API(object): print("\ninterrupted by user.") sys.exit(1) except: - print("uploading chunk failed, will try again in 5 seconds\r", end='') + try: + print("uploading chunk failed, will try again in 5 seconds\r", end='') + except: + print("uploading chunk failed, will try again in 5 seconds\r") sys.stdout.flush() data = {'result': -1} time.sleep(5)