summaryrefslogtreecommitdiffstats
path: root/src/lib/Options.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Options.py')
-rw-r--r--src/lib/Options.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/Options.py b/src/lib/Options.py
index fcd9107a9..dc9818c78 100644
--- a/src/lib/Options.py
+++ b/src/lib/Options.py
@@ -27,7 +27,12 @@ class Option(object):
def getCFP(self):
if not self.__cfp:
self.__cfp = ConfigParser.ConfigParser()
- self.__cfp.readfp(open(self.cfpath))
+ # FIXME: Remove this hack when except: pass below is fixed
+ try:
+ self.__cfp.readfp(open(self.cfpath))
+ except IOError:
+ e = sys.exc_info()[1]
+ print("Unable to read bcfg2.conf: %s" % e)
return self.__cfp
cfp = property(getCFP)
@@ -111,6 +116,11 @@ class Option(object):
self.value = self.get_cooked_value(os.environ[self.env])
return
if self.cf:
+ """
+ FIXME: This is masking any sort of error present in getCFP, we
+ need to remove this catchall exception and figure out something
+ better
+ """
try:
self.value = self.get_cooked_value(self.cfp.get(*self.cf))
return