summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/stanzabase.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream/stanzabase.py')
-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 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):