From a43de715ed485b9b1bc2669939b5da47b03a8237 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 18 Sep 2018 22:37:13 +0200 Subject: [PATCH] just import print_function --- ox/api.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ox/api.py b/ox/api.py index 2cbc641..3b75e97 100644 --- a/ox/api.py +++ b/ox/api.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 # GPL 2011 +from __future__ import print_function from types import MethodType import gzip import os @@ -183,10 +184,7 @@ class API(object): print("\ninterrupted by user.") sys.exit(1) except: - 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") + print("uploading chunk failed, will try again in 5 seconds\r", end='') sys.stdout.flush() data = {'result': -1} time.sleep(5)