Show More
@@ -236,10 +236,9 b' def callcatch(ui, func):' | |||||
236 | ui.error(_(b"(did you forget to compile extensions?)\n")) |
|
236 | ui.error(_(b"(did you forget to compile extensions?)\n")) | |
237 | elif m in b"zlib".split(): |
|
237 | elif m in b"zlib".split(): | |
238 | ui.error(_(b"(is your Python install correct?)\n")) |
|
238 | ui.error(_(b"(is your Python install correct?)\n")) | |
239 |
except |
|
239 | except util.urlerr.httperror as inst: | |
240 | if util.safehasattr(inst, b"code"): # HTTPError |
|
|||
241 |
|
|
240 | ui.error(_(b"abort: %s\n") % stringutil.forcebytestr(inst)) | |
242 | elif util.safehasattr(inst, b"reason"): # URLError or SSLError |
|
241 | except util.urlerr.urlerror as inst: | |
243 |
|
|
242 | try: # usually it is in the form (errno, strerror) | |
244 |
|
|
243 | reason = inst.reason.args[1] | |
245 |
|
|
244 | except (AttributeError, IndexError): | |
@@ -249,7 +248,8 b' def callcatch(ui, func):' | |||||
249 |
|
|
248 | # SSLError of Python 2.7.9 contains a unicode | |
250 |
|
|
249 | reason = encoding.unitolocal(reason) | |
251 |
|
|
250 | ui.error(_(b"abort: error: %s\n") % stringutil.forcebytestr(reason)) | |
252 | elif ( |
|
251 | except (IOError, OSError) as inst: | |
|
252 | if ( | |||
253 | util.safehasattr(inst, b"args") |
|
253 | util.safehasattr(inst, b"args") | |
254 | and inst.args |
|
254 | and inst.args | |
255 | and inst.args[0] == errno.EPIPE |
|
255 | and inst.args[0] == errno.EPIPE |
General Comments 0
You need to be logged in to leave comments.
Login now