From: Michael Tremer Date: Sat, 2 Mar 2013 18:42:57 +0000 (+0100) Subject: An other fix for progress bars when there is no TTY. X-Git-Tag: 0.9.25~1^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17f2125d9893903ac660f1cbfd64a001667b1707;p=pakfire.git An other fix for progress bars when there is no TTY. --- diff --git a/python/pakfire/transport.py b/python/pakfire/transport.py index c7c5c34a4..1adb1c61a 100644 --- a/python/pakfire/transport.py +++ b/python/pakfire/transport.py @@ -156,7 +156,10 @@ class PakfireHubTransportUploader(object): upload_id = self.get_upload_id() # Send the file content. - self.send_file(upload_id, progress_callback=progress.update) + if progress: + self.send_file(upload_id, progress_callback=progress.update) + else: + self.send_file(upload_id) except: if progress: