summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream
diff options
context:
space:
mode:
authorNathan Fritz <nathan@andyet.net>2010-04-22 21:24:28 -0700
committerNathan Fritz <nathan@andyet.net>2010-04-22 21:24:28 -0700
commit602a6d8491171de5cccb332684813e71f5d33c43 (patch)
treedfdc53119b3c28ec0d5ec61eb47ebf515d6fcd77 /sleekxmpp/xmlstream
parent37b571c55ab00b3107a480027f0ba212831bf7ed (diff)
downloadslixmpp-602a6d8491171de5cccb332684813e71f5d33c43.tar.gz
slixmpp-602a6d8491171de5cccb332684813e71f5d33c43.tar.bz2
slixmpp-602a6d8491171de5cccb332684813e71f5d33c43.tar.xz
slixmpp-602a6d8491171de5cccb332684813e71f5d33c43.zip
bugfixes and continuing to work on pubsub tests
Diffstat (limited to 'sleekxmpp/xmlstream')
-rw-r--r--sleekxmpp/xmlstream/stanzabase.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/sleekxmpp/xmlstream/stanzabase.py b/sleekxmpp/xmlstream/stanzabase.py
index ae9e9df7..57c727a3 100644
--- a/sleekxmpp/xmlstream/stanzabase.py
+++ b/sleekxmpp/xmlstream/stanzabase.py
@@ -77,11 +77,14 @@ class ElementBase(tostring.ToString):
def __next__(self):
self.idx += 1
- if self.idx + 1 > len(self.iterables):
+ if self.idx > len(self.iterables):
self.idx = 0
raise StopIteration
- return self.affiliations[self.idx]
+ return self.iterables[self.idx - 1]
+ def next(self):
+ return self.__next__()
+
def __len__(self):
return len(self.iterables)
@@ -140,6 +143,9 @@ class ElementBase(tostring.ToString):
def find(self, xpath): # for backwards compatiblity, expose elementtree interface
return self.xml.find(xpath)
+
+ def findall(self, xpath):
+ return self.xml.findall(xpath)
def setup(self, xml=None):
if self.xml is None: