summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2014-11-11 15:55:27 -0600
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2014-11-11 15:55:27 -0600
commit174e54f8455f9f5372da6469c5b093353bcd50ee (patch)
treea6b7b167bf6bdae4a778111ffc04848e9f910c7a
parentdfd62263c3f683f3afa6a0f8fdb2f288776a3d25 (diff)
parent4cf5bdf4fa667605a208bc677c5c56489532ec04 (diff)
downloadbcfg2-174e54f8455f9f5372da6469c5b093353bcd50ee.tar.gz
bcfg2-174e54f8455f9f5372da6469c5b093353bcd50ee.tar.bz2
bcfg2-174e54f8455f9f5372da6469c5b093353bcd50ee.zip
Merge pull request #233 from AlexanderS/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(':')