From 9e3d506651e446992a31f66f11b64831f42fddbf Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sun, 24 Oct 2010 18:22:41 -0400 Subject: 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. --- sleekxmpp/xmlstream/jid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sleekxmpp/xmlstream') 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': -- cgit v1.2.3