Handle InternalServerError on files_make_public_t

This commit is contained in:
Francesco Siddi 2016-03-01 17:44:01 +01:00
parent 8faa6c7384
commit 226b7f71a6

View File

@ -565,6 +565,7 @@ def files_make_public_t():
variation_t = next((item for item in f['variations'] \
if item['size'] == 't'), None)
if variation_t:
try:
storage = GoogleCloudStorageBucket(str(f['project']))
blob = storage.Get(variation_t['file_path'], to_dict=False)
if blob:
@ -575,7 +576,10 @@ def files_make_public_t():
print("Internal Server Error")
except Exception:
pass
except InternalServerError:
print("Internal Server Error")
except Exception:
pass
if __name__ == '__main__':
manager.run()