equal
deleted
inserted
replaced
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 ( |