From 04f06b69f0e26c66e1452c1d0bc540dbcda0ecdc Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sun, 13 Dec 2015 01:47:48 +0100 Subject: [PATCH] fetchparams: Fail on empty values See #302 --- vdirsyncer/cli/fetchparams.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vdirsyncer/cli/fetchparams.py b/vdirsyncer/cli/fetchparams.py index 9623d7a..59009c9 100644 --- a/vdirsyncer/cli/fetchparams.py +++ b/vdirsyncer/cli/fetchparams.py @@ -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