Skip to content

Commit

Permalink
[gcloud] Do not raise an exception when trying to delete a non-existe…
Browse files Browse the repository at this point in the history
…nt blob (#999)

Closes #998
  • Loading branch information
vchrisb authored and jschneier committed Sep 19, 2021
1 parent 2487c70 commit a33ce69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion storages/backends/gcloud.py
Expand Up @@ -162,7 +162,10 @@ def _save(self, name, content):

def delete(self, name):
name = self._normalize_name(clean_name(name))
self.bucket.delete_blob(name)
try:
self.bucket.delete_blob(name)
except NotFound:
pass

def exists(self, name):
if not name: # root element aka the bucket
Expand Down

0 comments on commit a33ce69

Please sign in to comment.