]> git.ipfire.org Git - pakfire.git/blobdiff - python/pakfire/transport.py
Check if there is a progressbar, when calling finish.
[pakfire.git] / python / pakfire / transport.py
index ca799a3a2519b1f4ea81568d54c82bdb3aa4297d..c7c5c34a4e806b6206d6ce9a5464ce322a975f08 100644 (file)
@@ -159,7 +159,8 @@ class PakfireHubTransportUploader(object):
                        self.send_file(upload_id, progress_callback=progress.update)
 
                except:
-                       progress.finish()
+                       if progress:
+                               progress.finish()
 
                        # Remove broken upload from server.
                        if upload_id:
@@ -169,7 +170,8 @@ class PakfireHubTransportUploader(object):
                        raise
 
                else:
-                       progress.finish()
+                       if progress:
+                               progress.finish()
 
                        # If no exception was raised, the upload
                        # has finished.