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