mercurial/scmutil.py
changeset 48934 06de08b36c82
parent 48913 f254fc73d956
child 48946 642e31cb55f0
equal deleted inserted replaced
48933:78f1de3f4be7 48934:06de08b36c82
   225         try:  # usually it is in the form (errno, strerror)
   225         try:  # usually it is in the form (errno, strerror)
   226             reason = inst.reason.args[1]
   226             reason = inst.reason.args[1]
   227         except (AttributeError, IndexError):
   227         except (AttributeError, IndexError):
   228             # it might be anything, for example a string
   228             # it might be anything, for example a string
   229             reason = inst.reason
   229             reason = inst.reason
   230         if isinstance(reason, pycompat.unicode):
   230         if isinstance(reason, str):
   231             # SSLError of Python 2.7.9 contains a unicode
   231             # SSLError of Python 2.7.9 contains a unicode
   232             reason = encoding.unitolocal(reason)
   232             reason = encoding.unitolocal(reason)
   233         ui.error(_(b"abort: error: %s\n") % stringutil.forcebytestr(reason))
   233         ui.error(_(b"abort: error: %s\n") % stringutil.forcebytestr(reason))
   234     except (IOError, OSError) as inst:
   234     except (IOError, OSError) as inst:
   235         if (
   235         if (