2to3: crawler.py port try as

This commit is contained in:
pictuga 2015-02-25 18:03:54 +08:00
parent c2d85e2bf9
commit 6a06b742f9

@ -94,7 +94,7 @@ class VerifiedHTTPSHandler(HTTPSHandler):
try:
return self.do_open(http_class_wrapper, req)
except URLError, e:
except URLError as e:
if type(e.reason) == ssl.SSLError and e.reason.args[0] == 1:
raise InvalidCertificateException(req.host, '',
e.reason.args[1])