From def34f0e4296bbba18c243a1ca34c7893763718b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Mon, 3 Dec 2012 12:42:30 -0800 Subject: Fix requesting channel binding from sockets that don't support it. --- sleekxmpp/features/feature_mechanisms/mechanisms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py index 9f3c47f6..555d8fad 100644 --- a/sleekxmpp/features/feature_mechanisms/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py @@ -98,7 +98,7 @@ class FeatureMechanisms(BasePlugin): jid = self.xmpp.requested_jid.bare result[value] = creds.get('email', jid) elif value == 'channel_binding': - if sys.version_info >= (3, 3): + if hasattr(self.xmpp.socket, 'get_channel_binding'): result[value] = self.xmpp.socket.get_channel_binding() else: result[value] = None -- cgit v1.2.3