mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
dispatch: handle empty IOError args
We occasionally throw bare IOError objects (especially in convert), don't choke on them.
This commit is contained in:
parent
e3b09c4564
commit
8a748a627c
@ -225,7 +225,8 @@ def _runcatch(req):
|
||||
# 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):
|
||||
|
Loading…
Reference in New Issue
Block a user