comparison mercurial/sslutil.py @ 14616:64dfbe576455

sslutil: Restore missing imports of socket and httplib to sslutil Two imports were omitted in the restructure of the code creating sslutil.py, socket and httplib are required when the 'ssl' module cannot be imported, restoring these imports allows mercurial to run on python2.4+2.5.
author Stephen Thorne <stephen@thorne.id.au>
date Tue, 14 Jun 2011 13:31:32 +1000
parents 5fa21960b2f4
children 27b080aa880a
comparison
equal deleted inserted replaced
14615:9fba795dd030 14616:64dfbe576455
15 import ssl 15 import ssl
16 ssl_wrap_socket = ssl.wrap_socket 16 ssl_wrap_socket = ssl.wrap_socket
17 CERT_REQUIRED = ssl.CERT_REQUIRED 17 CERT_REQUIRED = ssl.CERT_REQUIRED
18 except ImportError: 18 except ImportError:
19 CERT_REQUIRED = 2 19 CERT_REQUIRED = 2
20
21 import socket, httplib
20 22
21 def ssl_wrap_socket(sock, key_file, cert_file, 23 def ssl_wrap_socket(sock, key_file, cert_file,
22 cert_reqs=CERT_REQUIRED, ca_certs=None): 24 cert_reqs=CERT_REQUIRED, ca_certs=None):
23 if ca_certs: 25 if ca_certs:
24 raise util.Abort(_( 26 raise util.Abort(_(