Show More
@@ -2449,7 +2449,12 b' def dispatch(args):' | |||||
2449 | except AttributeError: |
|
2449 | except AttributeError: | |
2450 | pass |
|
2450 | pass | |
2451 |
|
2451 | |||
2452 | u = ui.ui() |
|
2452 | try: | |
|
2453 | u = ui.ui() | |||
|
2454 | except util.Abort, inst: | |||
|
2455 | sys.stderr.write(_("abort: %s\n") % inst) | |||
|
2456 | sys.exit(1) | |||
|
2457 | ||||
2453 | external = [] |
|
2458 | external = [] | |
2454 | for x in u.extensions(): |
|
2459 | for x in u.extensions(): | |
2455 | def on_exception(Exception, inst): |
|
2460 | def on_exception(Exception, inst): |
@@ -32,10 +32,13 b' class ui:' | |||||
32 | self.interactive = (self.interactive and interactive) |
|
32 | self.interactive = (self.interactive and interactive) | |
33 |
|
33 | |||
34 | def readconfig(self, fn): |
|
34 | def readconfig(self, fn): | |
35 | try: |
|
35 | if isinstance(fn, basestring): | |
36 | self.cdata.read(fn) |
|
36 | fn = [fn] | |
37 | except ConfigParser.ParsingError, inst: |
|
37 | for f in fn: | |
38 | raise util.Abort(_("Failed to parse %s\n%s") % (fn, inst)) |
|
38 | try: | |
|
39 | self.cdata.read(f) | |||
|
40 | except ConfigParser.ParsingError, inst: | |||
|
41 | raise util.Abort(_("Failed to parse %s\n%s") % (f, inst)) | |||
39 |
|
42 | |||
40 | def setconfig(self, section, name, val): |
|
43 | def setconfig(self, section, name, val): | |
41 | self.overlay[(section, name)] = val |
|
44 | self.overlay[(section, name)] = val |
General Comments 0
You need to be logged in to leave comments.
Login now