Skip to content

Commit

Permalink
Fix retry of failed uploads
Browse files Browse the repository at this point in the history
Introduced by c08747d
  • Loading branch information
Lykos153 committed Nov 21, 2020
1 parent ebcdbe1 commit 3ac62c4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions git_annex_remote_googledrive/keys.py
Expand Up @@ -129,15 +129,16 @@ def upload(self, local_filename: str, chunksize: int = None, progress_handler: c
logging.warning("Invalid resumable_uri. Probably expired. Repeating upload.")
else:
raise
except FileExistsError:
# Uploading an existing key is not an error
return


self.resumable_uri = None
self.file.upload(local_filename,
chunksize=chunksize,
progress_handler=self._upload_progress(progress_handler)
)
except FileExistsError:
# Uploading an existing key is not an error
return

self.resumable_uri = None

@property
Expand Down

0 comments on commit 3ac62c4

Please sign in to comment.