[secrets_new] In debug mode, on raise notfound

This commit is contained in:
Charlie Jacomme 2015-09-04 11:40:40 +02:00
parent 394597c186
commit 7ed5d5e829

View file

@ -108,8 +108,9 @@ def get(name):
except SecretNotFound as exc:
notfound_error = notfound_error or exc
except SecretForbidden:
logger.critical('...and that failed (Forbidden).')
raise
if not os.getenv('DBG_SECRETS'):
logger.critical('...and that failed (Forbidden).')
raise
logger.critical('...and that failed (not found).')
raise notfound_error