Add missing arg to validate call and add logging

This commit is contained in:
Joseph Schorr 2016-08-03 11:13:27 -04:00
parent 83849f4320
commit 974ab6c42c
3 changed files with 4 additions and 3 deletions

View file

@ -37,7 +37,8 @@ def _check_storage(app):
try:
storage.validate(storage.preferred_locations, app.config['HTTPCLIENT'])
return True
except:
except Exception as ex:
logger.exception('Storage check failed with exception %s', ex)
return False

View file

@ -115,7 +115,7 @@ class LocalStorage(BaseStorageV2):
os.remove(content_path)
def validate(self, client):
super(LocalStorage, self).validate()
super(LocalStorage, self).validate(client)
# Load the set of disk mounts.
try:

View file

@ -158,7 +158,7 @@ class SwiftStorage(BaseStorage):
return surl.format(scheme=scheme, host=hostname, full_path=full_path, sig=sig, expires=expires)
def validate(self, client):
super(SwiftStorage, self).validate()
super(SwiftStorage, self).validate(client)
if self._temp_url_key:
# Generate a direct download URL.