mercurial/scmutil.py
changeset 38312 79dd61a4554f
parent 38250 d0abd7949ea3
child 38331 cf59de802883
equal deleted inserted replaced
38311:47f5454a30ed 38312:79dd61a4554f
   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):