summaryrefslogtreecommitdiff
path: root/sleekxmpp/clientxmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2010-10-16 21:15:31 -0400
committerLance Stout <lancestout@gmail.com>2010-10-16 21:15:31 -0400
commit505a63da3a4cdcd1a38fc18f41a6988d792dda8b (patch)
treee4b234188d436ff784d8c132ce10e422b64d0b75 /sleekxmpp/clientxmpp.py
parent93fbcad2777cb853ec9f4e7132c078e503bba2f4 (diff)
downloadslixmpp-505a63da3a4cdcd1a38fc18f41a6988d792dda8b.tar.gz
slixmpp-505a63da3a4cdcd1a38fc18f41a6988d792dda8b.tar.bz2
slixmpp-505a63da3a4cdcd1a38fc18f41a6988d792dda8b.tar.xz
slixmpp-505a63da3a4cdcd1a38fc18f41a6988d792dda8b.zip
Cleanup, restore PEP8.
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r--sleekxmpp/clientxmpp.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 2bbd138c..1734a13c 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -117,7 +117,7 @@ class ClientXMPP(BaseXMPP):
self.register_feature(
"<session xmlns='urn:ietf:params:xml:ns:xmpp-session' />",
self._handle_start_session)
-
+
def handle_connected(self, event=None):
#TODO: Use stream state here
self.authenticated = False
@@ -125,7 +125,6 @@ class ClientXMPP(BaseXMPP):
self.bound = False
self.bindfail = False
-
def connect(self, address=tuple()):
"""
Connect to the XMPP server.
@@ -319,7 +318,9 @@ class ClientXMPP(BaseXMPP):
sasl_ns,
auth))
elif 'sasl:ANONYMOUS' in self.features and not self.boundjid.user:
- self.send("<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='ANONYMOUS' />")
+ self.send("<auth xmlns='%s' mechanism='%s' />" % (
+ sasl_ns,
+ 'ANONYMOUS'))
else:
logging.error("No appropriate login method.")
self.disconnect()