mercurial/dispatch.py
changeset 21824 57c70d3ad1c9
parent 21572 6c9b7712ac69
child 21961 af15de6775c7
equal deleted inserted replaced
21822:028a48105191 21824:57c70d3ad1c9
   223                 reason = inst.reason.args[1]
   223                 reason = inst.reason.args[1]
   224             except (AttributeError, IndexError):
   224             except (AttributeError, IndexError):
   225                 # it might be anything, for example a string
   225                 # it might be anything, for example a string
   226                 reason = inst.reason
   226                 reason = inst.reason
   227             ui.warn(_("abort: error: %s\n") % reason)
   227             ui.warn(_("abort: error: %s\n") % reason)
   228         elif util.safehasattr(inst, "args") and inst.args[0] == errno.EPIPE:
   228         elif (util.safehasattr(inst, "args")
       
   229               and inst.args and inst.args[0] == errno.EPIPE):
   229             if ui.debugflag:
   230             if ui.debugflag:
   230                 ui.warn(_("broken pipe\n"))
   231                 ui.warn(_("broken pipe\n"))
   231         elif getattr(inst, "strerror", None):
   232         elif getattr(inst, "strerror", None):
   232             if getattr(inst, "filename", None):
   233             if getattr(inst, "filename", None):
   233                 ui.warn(_("abort: %s: %s\n") % (inst.strerror, inst.filename))
   234                 ui.warn(_("abort: %s: %s\n") % (inst.strerror, inst.filename))