generate_link: warn when GCS blob can't be found.

This commit is contained in:
Sybren A. Stüvel 2016-08-26 15:00:53 +02:00
parent ff692d287c
commit dd6fc8bde4

View File

@ -307,6 +307,8 @@ def generate_link(backend, file_path, project_id=None, is_public=False):
storage = GoogleCloudStorageBucket(project_id)
blob = storage.Get(file_path)
if blob is None:
log.warning('generate_link(%r, %r): unable to find blob for file path,'
' returning empty link.', backend, file_path)
return ''
if is_public: