projects
/
cascardo
/
ipsilon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c33435
)
Add defaults to List objects
author
Simo Sorce
<simo@redhat.com>
Fri, 5 Dec 2014 20:37:28 +0000
(15:37 -0500)
committer
Patrick Uiterwijk
<puiterwijk@redhat.com>
Fri, 5 Dec 2014 20:44:06 +0000
(15:44 -0500)
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>
ipsilon/util/config.py
patch
|
blob
|
history
diff --git
a/ipsilon/util/config.py
b/ipsilon/util/config.py
index
94443e3
..
d8c69b3
100755
(executable)
--- 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)