summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2008-02-09 19:41:32 +0000
committerNarayan Desai <desai@mcs.anl.gov>2008-02-09 19:41:32 +0000
commit3e7e1a8001c831104561e2a2de1fd702d6590a43 (patch)
treeff8a690a71c785d0fef6b762d9e9b000f5da25c0 /src
parent7dfc041098d5f0efc9b959ddf626728b453a326e (diff)
downloadbcfg2-3e7e1a8001c831104561e2a2de1fd702d6590a43.tar.gz
bcfg2-3e7e1a8001c831104561e2a2de1fd702d6590a43.tar.bz2
bcfg2-3e7e1a8001c831104561e2a2de1fd702d6590a43.zip
Fix colon splitting for null cases (Reported by SolJ)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4348 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Options.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index 3bb7fe872..b25fb59fb 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -128,7 +128,10 @@ class OptionSet(dict):
self[key] = val
list_split = lambda x:x.replace(' ','').split(',')
-colon_split = lambda x:x.split(':')
+def colon_split(c_string):
+ if c_string:
+ return c_string.split(':')
+ return []
CFILE = Option('Specify configuration file', DEFAULT_CONFIG_LOCATION, cmd='-C',
odesc='<conffile>')