summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2010-02-25 01:12:15 +0000
committerNathan Fritz <fritzy@netflint.net>2010-02-25 01:12:15 +0000
commite06cdec81ae8732b496acdbb3e86ad8ef7afe640 (patch)
tree0bd8944a53b70adf7b1246dd07c3a09a5eb26d07 /sleekxmpp/xmlstream
parent7d41d68293eee153ed037ce31b2c642b8857c8e3 (diff)
downloadslixmpp-e06cdec81ae8732b496acdbb3e86ad8ef7afe640.tar.gz
slixmpp-e06cdec81ae8732b496acdbb3e86ad8ef7afe640.tar.bz2
slixmpp-e06cdec81ae8732b496acdbb3e86ad8ef7afe640.tar.xz
slixmpp-e06cdec81ae8732b496acdbb3e86ad8ef7afe640.zip
fixed some unicode problems for 2.6
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index 480e9602..7a5ba4a1 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -18,7 +18,10 @@ class JID(object):
if name == 'resource':
return self.jid.split('/', 1)[-1]
elif name == 'user':
- return self.jid.split('@', 1)[0]
+ if '@' in self.jid:
+ return self.jid.split('@', 1)[0]
+ else:
+ return ''
elif name == 'server':
return self.jid.split('@', 1)[-1].split('/', 1)[0]
elif name == 'full':