it seems that prefixiter is expected to return child *folder* but was relying on a specific .children implementation, fix this
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 27 Jan 2010 09:21:38 +0100
changeset 4383 e62a9efdd90a
parent 4382 6fb02edd05da
child 4384 f7b22d552b13
it seems that prefixiter is expected to return child *folder* but was relying on a specific .children implementation, fix this
mixins.py
--- a/mixins.py	Tue Jan 26 20:30:35 2010 +0100
+++ b/mixins.py	Wed Jan 27 09:21:38 2010 +0100
@@ -67,14 +67,11 @@
             _done = set()
         if self.eid in _done:
             return
+        _done.add(self.eid)
         yield self
-        _done.add(self.eid)
-        for child in self.iterchildren(_done):
-            try:
-                for entity in child.prefixiter(_done):
-                    yield entity
-            except AttributeError:
-                pass
+        for child in self.same_type_children():
+            for entity in child.prefixiter(_done):
+                yield entity
 
     @cached
     def path(self):