ssl: fix compatibility with pre-2.6 Python
authorMatt Mackall <mpm@selenic.com>
Wed, 10 Feb 2010 17:42:57 -0600
changeset 10411 af4c42ec19ed
parent 10410 b59fba37e5e6
child 10412 5326800d6937
ssl: fix compatibility with pre-2.6 Python
mercurial/url.py
--- a/mercurial/url.py	Wed Feb 10 21:17:58 2010 +0100
+++ b/mercurial/url.py	Wed Feb 10 17:42:57 2010 -0600
@@ -272,7 +272,7 @@
 
     try:
         _create_connection = socket.create_connection
-    except ImportError:
+    except AttributeError:
         def _create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
                                source_address=None):
             # lifted from Python 2.6