features/starttls: handle the case where the socket is an sslobject
Thanks pep.
This commit is contained in:
parent
7738a01311
commit
20107ad516
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ class FeatureMechanisms(BasePlugin):
|
||||||
if value == 'encrypted':
|
if value == 'encrypted':
|
||||||
if 'starttls' in self.xmpp.features:
|
if 'starttls' in self.xmpp.features:
|
||||||
result[value] = True
|
result[value] = True
|
||||||
elif isinstance(self.xmpp.socket, ssl.SSLSocket):
|
elif isinstance(self.xmpp.socket, (ssl.SSLSocket, ssl.SSLObject)):
|
||||||
result[value] = True
|
result[value] = True
|
||||||
else:
|
else:
|
||||||
result[value] = False
|
result[value] = False
|
||||||
|
|
Loading…
Reference in a new issue