summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-12-05 15:37:28 -0500
committerPatrick Uiterwijk <puiterwijk@redhat.com>2014-12-05 15:44:06 -0500
commit6b37bf2965a5c66cbe0f2a1def92a815170c4ce3 (patch)
tree13bec86690d7dcf1104d11acff0f06afa06ebf6e
parent1c3343573f008e7fe4c14cfb3523960a5376dc30 (diff)
Add defaults to List objects
Otherwise we get backtraces when checking for list members and no configuration have been stored in the database yet. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
-rwxr-xr-xipsilon/util/config.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ipsilon/util/config.py b/ipsilon/util/config.py
index 94443e3..d8c69b3 100755
--- a/ipsilon/util/config.py
+++ b/ipsilon/util/config.py
@@ -159,6 +159,8 @@ class List(Option):
super(List, self).__init__(name, description)
if default_list:
self._default_value = list(default_list)
+ else:
+ self._default_value = []
def set_value(self, value):
self._assigned_value = list(value)