From 17f2125d9893903ac660f1cbfd64a001667b1707 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 2 Mar 2013 19:42:57 +0100 Subject: [PATCH] An other fix for progress bars when there is no TTY. --- python/pakfire/transport.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/pakfire/transport.py b/python/pakfire/transport.py index c7c5c34a..1adb1c61 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: -- 2.39.2