Don't exception log for expected 404s in Swift storage

Fixes #1850
This commit is contained in:
Joseph Schorr 2016-09-20 14:07:29 -04:00
parent bd9c258ba2
commit 4f0ddc8d6e

View file

@ -120,6 +120,11 @@ class SwiftStorage(BaseStorage):
path = self._normalize_path(path)
try:
return self._get_connection().head_object(self._swift_container, path)
except ClientException as ce:
if ce.http_status != 404:
logger.exception('Could not head object at path %s: %s', path, ex)
return None
except Exception as ex:
logger.exception('Could not head object at path %s: %s', path, ex)
return None