url: fix python < 2.6 with ssl installed
_GLOBAL_DEFAULT_TIMEOUT isn't related to ssl, but to python < 2.6, move it to
the right hunk.
--- a/mercurial/url.py Mon Feb 15 09:57:11 2010 +0100
+++ b/mercurial/url.py Mon Feb 15 18:12:50 2010 +0100
@@ -268,11 +268,11 @@
ssl = socket.ssl(sock, key_file, cert_file)
return httplib.FakeSocket(sock, ssl)
- _GLOBAL_DEFAULT_TIMEOUT = object()
-
try:
_create_connection = socket.create_connection
except AttributeError:
+ _GLOBAL_DEFAULT_TIMEOUT = object()
+
def _create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
# lifted from Python 2.6