diff options
Diffstat (limited to 'sleekxmpp/features/feature_mechanisms')
-rw-r--r-- | sleekxmpp/features/feature_mechanisms/mechanisms.py | 4 | ||||
-rw-r--r-- | sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sleekxmpp/features/feature_mechanisms/mechanisms.py b/sleekxmpp/features/feature_mechanisms/mechanisms.py index d60818bb..a6cff0a0 100644 --- a/sleekxmpp/features/feature_mechanisms/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/mechanisms.py @@ -29,6 +29,7 @@ class feature_mechanisms(base_plugin): self.description = "SASL Stream Feature" self.stanza = stanza + self.use_mech = self.config.get('use_mech', None) def tls_active(): return 'starttls' in self.xmpp.features @@ -49,7 +50,8 @@ class feature_mechanisms(base_plugin): username=self.xmpp.boundjid.user, sec_query=suelta.sec_query_allow, request_values=sasl_callback, - tls_active=tls_active) + tls_active=tls_active, + mech=self.use_mech) register_stanza_plugin(StreamFeatures, stanza.Mechanisms) diff --git a/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py b/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py index 1189cd80..c09cafbd 100644 --- a/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py +++ b/sleekxmpp/features/feature_mechanisms/stanza/mechanisms.py @@ -42,9 +42,9 @@ class Mechanisms(ElementBase): """ self.del_mechanisms() for val in values: - mech = ET.Element('{%s}mechanism' % self.namespace) - mech.text = val - self.append(mech) + mech = ET.Element('{%s}mechanism' % self.namespace) + mech.text = val + self.append(mech) def del_mechanisms(self): """ |