aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gbp/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/config.py b/gbp/config.py
index 6abf7117..2cc98b1e 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -82,10 +82,10 @@ class GbpOptionParser(OptionParser):
default = self.config[option_name]
if kwargs.has_key('action'):
if kwargs['action'] in [ 'store_true', 'store_false'] and self.config[option_name]:
- if self.config[option_name] in [ 'True', 'False']:
+ if self.config[option_name] in [ 'True', 'False' ]:
default = eval(self.config[option_name])
else:
- raise Exception, "Boolean options must be True or False"
+ raise ValueError, "Boolean options must be True or False"
OptionParser.add_option(self,"--%s%s" % (self.prefix, option_name), dest=dest,
default=default,
help=help % self.config, **kwargs)