python2 print does not support end=

This commit is contained in:
j 2018-09-18 10:33:11 +02:00
parent 2b45d6932b
commit 8ce2e3149a

View file

@ -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)