Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 9470:ba75830d17a9
dispatch: catch ConfigError while constructing ui
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 19 Sep 2009 13:52:54 +0200 |
parents | 1de6e7e1bb9f |
children | bccf780f78ed 02c43e8e0835 |
comparison
equal
deleted
inserted
replaced
9469:7f0f882af23d | 9470:ba75830d17a9 |
---|---|
21 u = _ui.ui() | 21 u = _ui.ui() |
22 if '--traceback' in args: | 22 if '--traceback' in args: |
23 u.setconfig('ui', 'traceback', 'on') | 23 u.setconfig('ui', 'traceback', 'on') |
24 except util.Abort, inst: | 24 except util.Abort, inst: |
25 sys.stderr.write(_("abort: %s\n") % inst) | 25 sys.stderr.write(_("abort: %s\n") % inst) |
26 return -1 | |
27 except error.ConfigError, inst: | |
28 sys.stderr.write(_("hg: %s\n") % inst) | |
26 return -1 | 29 return -1 |
27 return _runcatch(u, args) | 30 return _runcatch(u, args) |
28 | 31 |
29 def _runcatch(ui, args): | 32 def _runcatch(ui, args): |
30 def catchterm(*args): | 33 def catchterm(*args): |