summaryrefslogtreecommitdiffstats
path: root/bindings/lilv.i
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/lilv.i')
-rw-r--r--bindings/lilv.i8
1 files changed, 4 insertions, 4 deletions
diff --git a/bindings/lilv.i b/bindings/lilv.i
index 6b2df7e..c4c33fb 100644
--- a/bindings/lilv.i
+++ b/bindings/lilv.i
@@ -34,11 +34,11 @@ namespace Lilv {
self.iter = plugins.begin()
def next(self):
- self.iter = self.plugins.next(self.iter)
- if not self.plugins.is_end(self.iter):
- return self.plugins.get(self.iter)
- else:
+ if self.plugins.is_end(self.iter):
raise StopIteration
+ plugin = self.plugins.get(self.iter)
+ self.iter = self.plugins.next(self.iter)
+ return plugin
return Iterator(self)