Fixed up cursor iteration more properly(?)
[automanga.git] / manga / lib.py
index 54bcb77..da64e0c 100644 (file)
@@ -214,7 +214,14 @@ class cursor(object):
         raise StopIteration()
 
     def __iter__(self):
-        return self
+        def iterator():
+            yield self.cur
+            while True:
+                try:
+                    yield self.next()
+                except StopIteration:
+                    break
+        return iterator()
 
 loaded = {}
 def findlib(name):