diff options
author | fritzy <fritzy@ip-10-251-242-239.ec2.internal> | 2010-08-21 22:48:43 +0000 |
---|---|---|
committer | fritzy <fritzy@ip-10-251-242-239.ec2.internal> | 2010-08-21 22:48:43 +0000 |
commit | 345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4 (patch) | |
tree | ca0c851734641f6c4a0169528eee19bd706191be /sleekxmpp/xmlstream/stanzabase.py | |
parent | c05ddcb7f5eaa5bbf7efb4e765d04b62212a3394 (diff) | |
download | slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.gz slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.bz2 slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.xz slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.zip |
added form compatibility with old api, stanzas now bool() to True on 2.x, jid attributes will return '' if not set
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-rw-r--r-- | sleekxmpp/xmlstream/stanzabase.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py index 3223901a..7458f3c7 100644 --- a/sleekxmpp/xmlstream/stanzabase.py +++ b/sleekxmpp/xmlstream/stanzabase.py @@ -362,7 +362,10 @@ class ElementBase(object): self.idx = 0 return self - def __bool__(self): + def __bool__(self): #python 3.x + return True + + def __nonzero__(self): #python 2.x return True def __next__(self): |