From dd6fc8bde42a71cd328eb061aaad66cdb943afc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 26 Aug 2016 15:00:53 +0200 Subject: [PATCH] generate_link: warn when GCS blob can't be found. --- pillar/api/file_storage.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pillar/api/file_storage.py b/pillar/api/file_storage.py index 0a19f2fb..2de8f43d 100644 --- a/pillar/api/file_storage.py +++ b/pillar/api/file_storage.py @@ -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: