changeset 10411:af4c42ec19ed

ssl: fix compatibility with pre-2.6 Python
author Matt Mackall <mpm@selenic.com>
date Wed, 10 Feb 2010 17:42:57 -0600
parents b59fba37e5e6
children 5326800d6937
files mercurial/url.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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