[Zope-Checkins] CVS: Zope/lib/python/OFS - ObjectManager.py:1.149
Shane Hathaway
shane@cvs.zope.org
Fri, 12 Apr 2002 15:35:30 -0400
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv14891
Modified Files:
ObjectManager.py
Log Message:
Collector #167
=== Zope/lib/python/OFS/ObjectManager.py 1.148 => 1.149 ===
seen={}
vals=[]
+ relativePhysicalPath = ()
have=seen.has_key
x=0
while x < 100:
@@ -422,13 +423,17 @@
for i in obj._objects:
try:
id=i['id']
- if (not have(id)) and (i['meta_type'] in t):
+ physicalPath = relativePhysicalPath + (id,)
+ if (not have(physicalPath)) and (i['meta_type'] in t):
vals.append(get(id))
- seen[id]=1
+ seen[physicalPath]=1
except: pass
- if hasattr(obj,'aq_parent'): obj=obj.aq_parent
- else: return vals
+ if hasattr(obj,'aq_parent'):
+ obj=obj.aq_parent
+ relativePhysicalPath = ('..',) + relativePhysicalPath
+ else:
+ return vals
x=x+1
return vals