fetchparams: Fail on empty values

See #302
This commit is contained in:
Markus Unterwaditzer 2015-12-13 01:47:48 +01:00
parent 0044a7af74
commit 04f06b69f0

View file

@ -64,6 +64,10 @@ def _fetch_value(opts, key):
password_cache[cache_key] = e
raise
else:
if not rv:
raise exceptions.UserError('Empty value for {}, this most likely '
'indicates an error.'
.format(key))
password_cache[cache_key] = rv
return rv