mercurial/ui.py
changeset 4729 9881abfc0e44
parent 4717 97369f6a6bb6
child 5036 ca0d02222d6a
equal deleted inserted replaced
4728:7bb5bcb089e3 4729:9881abfc0e44
   235         cdata = self._get_cdata(untrusted)
   235         cdata = self._get_cdata(untrusted)
   236         if cdata.has_option(section, name):
   236         if cdata.has_option(section, name):
   237             try:
   237             try:
   238                 func = getattr(cdata, funcname)
   238                 func = getattr(cdata, funcname)
   239                 return func(section, name)
   239                 return func(section, name)
   240             except ConfigParser.InterpolationError, inst:
   240             except (ConfigParser.InterpolationError, ValueError), inst:
   241                 msg = _("Error in configuration section [%s] "
   241                 msg = _("Error in configuration section [%s] "
   242                         "parameter '%s':\n%s") % (section, name, inst)
   242                         "parameter '%s':\n%s") % (section, name, inst)
   243                 if abort:
   243                 if abort:
   244                     raise util.Abort(msg)
   244                     raise util.Abort(msg)
   245                 self.warn(_("Ignored: %s\n") % msg)
   245                 self.warn(_("Ignored: %s\n") % msg)