]> git.ipfire.org Git - pakfire.git/commitdiff
An other fix for progress bars when there is no TTY.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 2 Mar 2013 18:42:57 +0000 (19:42 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 2 Mar 2013 18:42:57 +0000 (19:42 +0100)
python/pakfire/transport.py

index c7c5c34a4e806b6206d6ce9a5464ce322a975f08..1adb1c61a508611e6253c37b0727f485d8a54a9c 100644 (file)
@@ -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: