diff options
author | Lance Stout <lancestout@gmail.com> | 2010-10-24 18:22:41 -0400 |
---|---|---|
committer | Lance Stout <lancestout@gmail.com> | 2010-10-24 18:22:41 -0400 |
commit | 9e3d506651e446992a31f66f11b64831f42fddbf (patch) | |
tree | a140979ac7c609b371f40130a46251d9203a21ab /sleekxmpp/xmlstream/jid.py | |
parent | 2f3ff37a2470c2b1c0f3f20daada1a2fd3d19535 (diff) | |
download | slixmpp-9e3d506651e446992a31f66f11b64831f42fddbf.tar.gz slixmpp-9e3d506651e446992a31f66f11b64831f42fddbf.tar.bz2 slixmpp-9e3d506651e446992a31f66f11b64831f42fddbf.tar.xz slixmpp-9e3d506651e446992a31f66f11b64831f42fddbf.zip |
Fixed resource bug in JIDs.
JIDs without resources will return '' instead of the bare JID.
Cleaned up JID tests, and added check_JID to SleekTest.
Diffstat (limited to 'sleekxmpp/xmlstream/jid.py')
-rw-r--r-- | sleekxmpp/xmlstream/jid.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/jid.py b/sleekxmpp/xmlstream/jid.py index 7362814e..149611b7 100644 --- a/sleekxmpp/xmlstream/jid.py +++ b/sleekxmpp/xmlstream/jid.py @@ -57,7 +57,7 @@ class JID(object): full, or bare. """ if name == 'resource': - if self._resource is None: + if self._resource is None and '/' in self._jid: self._resource = self._jid.split('/', 1)[-1] return self._resource or "" elif name == 'user': |