diff --git a/slixmpp/__init__.py b/slixmpp/__init__.py index c09446df..46804bf5 100644 --- a/slixmpp/__init__.py +++ b/slixmpp/__init__.py @@ -7,7 +7,8 @@ """ import asyncio -asyncio.sslproto._is_sslproto_available=lambda: False +if hasattr(asyncio, 'sslproto'): # no ssl proto: very old asyncio = no need for this + asyncio.sslproto._is_sslproto_available=lambda: False import logging logging.getLogger(__name__).addHandler(logging.NullHandler())