Show More
@@ -268,11 +268,11 if has_https: | |||||
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 |
General Comments 0
You need to be logged in to leave comments.
Login now