diff options
author | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-11-11 15:55:27 -0600 |
---|---|---|
committer | Chris St. Pierre <chris.a.st.pierre@gmail.com> | 2014-11-11 15:55:27 -0600 |
commit | 174e54f8455f9f5372da6469c5b093353bcd50ee (patch) | |
tree | a6b7b167bf6bdae4a778111ffc04848e9f910c7a /src/lib | |
parent | dfd62263c3f683f3afa6a0f8fdb2f288776a3d25 (diff) | |
parent | 4cf5bdf4fa667605a208bc677c5c56489532ec04 (diff) | |
download | bcfg2-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
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Options/Types.py | 4 |
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(':') |