summaryrefslogtreecommitdiff
path: root/slixmpp/__init__.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-08-08 23:35:33 +0200
committermathieui <mathieui@mathieui.net>2018-08-08 23:35:33 +0200
commit490f15b8fc9e5d205fd75cf4ce13cd2b3841ddf1 (patch)
tree71539783faf5f3ebc49ebaf386fd9478946e4cab /slixmpp/__init__.py
parent62661ee04f9df94b0a79be077f7d38fb313ceffd (diff)
downloadslixmpp-490f15b8fc9e5d205fd75cf4ce13cd2b3841ddf1.tar.gz
slixmpp-490f15b8fc9e5d205fd75cf4ce13cd2b3841ddf1.tar.bz2
slixmpp-490f15b8fc9e5d205fd75cf4ce13cd2b3841ddf1.tar.xz
slixmpp-490f15b8fc9e5d205fd75cf4ce13cd2b3841ddf1.zip
Fix compatibility with python 3.5 and 3.6
which do not have loop.start_tls and require the old ssl implementation.
Diffstat (limited to 'slixmpp/__init__.py')
-rw-r--r--slixmpp/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/slixmpp/__init__.py b/slixmpp/__init__.py
index 0730cc60..caa39db7 100644
--- a/slixmpp/__init__.py
+++ b/slixmpp/__init__.py
@@ -9,6 +9,10 @@
import logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
+import asyncio
+# Required for python < 3.7 to use the old ssl implementation
+# and manage to do starttls as an unintended side effect
+asyncio.sslproto._is_sslproto_available = lambda: False
from slixmpp.stanza import Message, Presence, Iq
from slixmpp.jid import JID, InvalidJID