changeset 10482:95265afff99f stable

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.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 15 Feb 2010 18:12:50 +0100
parents 3062af0ba177
children c315125d0a39
files mercurial/url.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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