##// END OF EJS Templates
Catch illegal boolean values in hgrc nicely....
Thomas Arendsen Hein -
r4729:9881abfc default
parent child Browse files
Show More
@@ -237,7 +237,7 b' class ui(object):'
237 237 try:
238 238 func = getattr(cdata, funcname)
239 239 return func(section, name)
240 except ConfigParser.InterpolationError, inst:
240 except (ConfigParser.InterpolationError, ValueError), inst:
241 241 msg = _("Error in configuration section [%s] "
242 242 "parameter '%s':\n%s") % (section, name, inst)
243 243 if abort:
@@ -34,8 +34,8 b" print repr(testui.config('values', 'unkn"
34 34 print "---"
35 35 try:
36 36 print repr(testui.configbool('values', 'string'))
37 except ValueError, why:
38 print why
37 except util.Abort, inst:
38 print inst
39 39 print repr(testui.configbool('values', 'bool1'))
40 40 print repr(testui.configbool('values', 'bool2'))
41 41 print repr(testui.configbool('values', 'bool2', True))
@@ -8,6 +8,7 b' Error in configuration section [interpol'
8 8 'false'
9 9 None
10 10 ---
11 Error in configuration section [values] parameter 'string':
11 12 Not a boolean: string value
12 13 True
13 14 False
General Comments 0
You need to be logged in to leave comments. Login now