Skip to content

Commit 62128cf

Browse files
committed
ignore errors when deleting files from gcs
1 parent 9f630c3 commit 62128cf

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

src/pyinfraboxutils/storage.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,13 @@ def delete_cache(self, key):
146146
return self._delete('cache/%s' % key)
147147

148148
def _delete(self, key):
149-
client = gcs.Client()
150-
bucket = client.get_bucket(self.bucket)
151-
blob = bucket.blob(key)
152-
blob.delete()
149+
try:
150+
client = gcs.Client()
151+
bucket = client.get_bucket(self.bucket)
152+
blob = bucket.blob(key)
153+
blob.delete()
154+
except:
155+
pass
153156

154157
def _upload(self, stream, key):
155158
client = gcs.Client()

0 commit comments

Comments
 (0)