Commit c6f302b0 authored by Lucas Carvalho's avatar Lucas Carvalho

Typo.

parent 68f4c30a
......@@ -68,6 +68,7 @@ class HTTPSConnectionCertificateVerification(httplib.HTTPSConnection):
ca_certs=self.ssl_cert_path,
cert_reqs=ssl.CERT_REQUIRED)
cert = self.sock.getpeercert()
if cert:
for field in cert['subject']:
if field[0][0] == 'commonName':
certhost = field[0][1]
......@@ -90,7 +91,7 @@ class VerifiedHTTPSHandler(urllib2.HTTPSHandler):
def install_opener_director(info_dict):
if info_dict.get('schema') in ('https',):
if info_dict.get('scheme') in ('https',):
https_handler = VerifiedHTTPSHandler()
url_opener = urllib2.build_opener(https_handler)
urllib2.install_opener(url_opener)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment