# HG changeset patch # User Matt Mackall # Date 2010-02-10 23:42:57 # Node ID af4c42ec19edb74e7dba101c5d14669c13e315dd # Parent b59fba37e5e6ffd45cabfbfd8f70f9554f3dbee5 ssl: fix compatibility with pre-2.6 Python diff --git a/mercurial/url.py b/mercurial/url.py --- a/mercurial/url.py +++ b/mercurial/url.py @@ -272,7 +272,7 @@ if has_https: 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