Get access to __parent__ directly instead of using zapi.getParent() to avoid exceptions
--- a/ztfy/utils/traversing.py Sat Aug 15 00:11:09 2009 +0200
+++ b/ztfy/utils/traversing.py Mon Aug 17 23:52:10 2009 +0200
@@ -32,9 +32,9 @@
if allow_context:
parent = context
else:
- parent = zapi.getParent(context)
+ parent = getattr(context, '__parent__', None)
while parent is not None:
if interface.providedBy(parent):
return interface(parent)
- parent = zapi.getParent(parent)
+ parent = getattr(parent, '__parent__', None)
return None