self.send_file(upload_id, progress_callback=progress.update)
except:
- progress.finish()
+ if progress:
+ progress.finish()
# Remove broken upload from server.
if upload_id:
raise
else:
- progress.finish()
+ if progress:
+ progress.finish()
# If no exception was raised, the upload
# has finished.