summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2014-11-10 19:56:01 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2014-11-10 19:56:01 +0100
commitbe3f73a029a5b99a1662ae0914f69f750a7f5104 (patch)
treeb5b1e53f5fe2be1595d0bae4db834835a7e4bd99
parent3f32d999c6e75af57058e389a07d1ab6a62eaebb (diff)
parent4cf5bdf4fa667605a208bc677c5c56489532ec04 (diff)
downloadbcfg2-be3f73a029a5b99a1662ae0914f69f750a7f5104.tar.gz
bcfg2-be3f73a029a5b99a1662ae0914f69f750a7f5104.tar.bz2
bcfg2-be3f73a029a5b99a1662ae0914f69f750a7f5104.zip
Merge branch 'fix-list-options'
* fix-list-options: Options/Types: add abbility to set empty lists
-rw-r--r--src/lib/Bcfg2/Options/Types.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Options/Types.py b/src/lib/Bcfg2/Options/Types.py
index 1c04fede3..ac099e135 100644
--- a/src/lib/Bcfg2/Options/Types.py
+++ b/src/lib/Bcfg2/Options/Types.py
@@ -19,12 +19,16 @@ def path(value):
def comma_list(value):
""" Split a comma-delimited list, with optional whitespace around
the commas."""
+ if value == '':
+ return []
return _COMMA_SPLIT_RE.split(value)
def colon_list(value):
""" Split a colon-delimited list. Whitespace is not allowed
around the colons. """
+ if value == '':
+ return []
return value.split(':')