equal
deleted
inserted
replaced
231 try: # usually it is in the form (errno, strerror) |
231 try: # usually it is in the form (errno, strerror) |
232 reason = inst.reason.args[1] |
232 reason = inst.reason.args[1] |
233 except (AttributeError, IndexError): |
233 except (AttributeError, IndexError): |
234 # it might be anything, for example a string |
234 # it might be anything, for example a string |
235 reason = inst.reason |
235 reason = inst.reason |
236 if isinstance(reason, unicode): |
236 if isinstance(reason, pycompat.unicode): |
237 # SSLError of Python 2.7.9 contains a unicode |
237 # SSLError of Python 2.7.9 contains a unicode |
238 reason = encoding.unitolocal(reason) |
238 reason = encoding.unitolocal(reason) |
239 ui.warn(_("abort: error: %s\n") % reason) |
239 ui.warn(_("abort: error: %s\n") % reason) |
240 elif (util.safehasattr(inst, "args") |
240 elif (util.safehasattr(inst, "args") |
241 and inst.args and inst.args[0] == errno.EPIPE): |
241 and inst.args and inst.args[0] == errno.EPIPE): |