Mercurial > hg-stable
changeset 21824:57c70d3ad1c9
dispatch: handle empty IOError args
We occasionally throw bare IOError objects (especially in convert),
don't choke on them.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 01 Jul 2014 19:54:48 -0500 |
parents | 028a48105191 |
children | 4b93e19cd6e6 |
files | mercurial/dispatch.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/dispatch.py Thu Jun 12 18:07:21 2014 -0700 +++ b/mercurial/dispatch.py Tue Jul 01 19:54:48 2014 -0500 @@ -225,7 +225,8 @@ # it might be anything, for example a string reason = inst.reason ui.warn(_("abort: error: %s\n") % reason) - elif util.safehasattr(inst, "args") and inst.args[0] == errno.EPIPE: + elif (util.safehasattr(inst, "args") + and inst.args and inst.args[0] == errno.EPIPE): if ui.debugflag: ui.warn(_("broken pipe\n")) elif getattr(inst, "strerror", None):