equal
deleted
inserted
replaced
131 if hasattr(inst, "code"): |
131 if hasattr(inst, "code"): |
132 ui.warn(_("abort: %s\n") % inst) |
132 ui.warn(_("abort: %s\n") % inst) |
133 elif hasattr(inst, "reason"): |
133 elif hasattr(inst, "reason"): |
134 try: # usually it is in the form (errno, strerror) |
134 try: # usually it is in the form (errno, strerror) |
135 reason = inst.reason.args[1] |
135 reason = inst.reason.args[1] |
136 except: # it might be anything, for example a string |
136 except AttributeError: # it might be anything, for example a string |
137 reason = inst.reason |
137 reason = inst.reason |
138 ui.warn(_("abort: error: %s\n") % reason) |
138 ui.warn(_("abort: error: %s\n") % reason) |
139 elif hasattr(inst, "args") and inst.args[0] == errno.EPIPE: |
139 elif hasattr(inst, "args") and inst.args[0] == errno.EPIPE: |
140 if ui.debugflag: |
140 if ui.debugflag: |
141 ui.warn(_("broken pipe\n")) |
141 ui.warn(_("broken pipe\n")) |