mercurial/url.py
branchstable
changeset 10482 95265afff99f
parent 10415 677f15da38c1
child 10484 cadd7e076b69
--- 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