From 3adb33dc8c52e2596fda52ad754f7cfa1295445c Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sat, 19 Sep 2015 22:44:43 +0200 Subject: [PATCH] Avoid crash when no defaults --- vdirsyncer/cli/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py index 3638f80..c39c13e 100644 --- a/vdirsyncer/cli/utils.py +++ b/vdirsyncer/cli/utils.py @@ -464,7 +464,8 @@ def format_storage_config(cls, header=True): from ..utils import get_class_init_specs handled = set() for spec in get_class_init_specs(cls, stop_at=Storage): - defaults = dict(zip(spec.args[-len(spec.defaults):], spec.defaults)) + defaults = spec.defaults or () + defaults = dict(zip(spec.args[-len(defaults):], defaults)) for key in spec.args[1:]: if key in handled: continue