From 20107ad516640a6f7bc8827ca85020fade18344d Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 7 Aug 2018 23:30:06 +0200 Subject: [PATCH] features/starttls: handle the case where the socket is an sslobject Thanks pep. --- slixmpp/features/feature_mechanisms/mechanisms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slixmpp/features/feature_mechanisms/mechanisms.py b/slixmpp/features/feature_mechanisms/mechanisms.py index 27877e67..30449de0 100644 --- a/slixmpp/features/feature_mechanisms/mechanisms.py +++ b/slixmpp/features/feature_mechanisms/mechanisms.py @@ -116,7 +116,7 @@ class FeatureMechanisms(BasePlugin): if value == 'encrypted': if 'starttls' in self.xmpp.features: result[value] = True - elif isinstance(self.xmpp.socket, ssl.SSLSocket): + elif isinstance(self.xmpp.socket, (ssl.SSLSocket, ssl.SSLObject)): result[value] = True else: result[value] = False