equal
deleted
inserted
replaced
266 'certificate checking requires Python 2.6')) |
266 'certificate checking requires Python 2.6')) |
267 |
267 |
268 ssl = socket.ssl(sock, key_file, cert_file) |
268 ssl = socket.ssl(sock, key_file, cert_file) |
269 return httplib.FakeSocket(sock, ssl) |
269 return httplib.FakeSocket(sock, ssl) |
270 |
270 |
271 _GLOBAL_DEFAULT_TIMEOUT = object() |
|
272 |
|
273 try: |
271 try: |
274 _create_connection = socket.create_connection |
272 _create_connection = socket.create_connection |
275 except AttributeError: |
273 except AttributeError: |
|
274 _GLOBAL_DEFAULT_TIMEOUT = object() |
|
275 |
276 def _create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, |
276 def _create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, |
277 source_address=None): |
277 source_address=None): |
278 # lifted from Python 2.6 |
278 # lifted from Python 2.6 |
279 |
279 |
280 msg = "getaddrinfo returns an empty list" |
280 msg = "getaddrinfo returns an empty list" |