[Zope-Checkins] CVS: Zope/lib/python/OFS - ObjectManager.py:1.137.4.8
Shane Hathaway
shane@cvs.zope.org
Fri, 12 Apr 2002 15:46:33 -0400
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv18405
Modified Files:
Tag: Zope-2_4-branch
ObjectManager.py
Log Message:
Collector #167
=== Zope/lib/python/OFS/ObjectManager.py 1.137.4.7 => 1.137.4.8 ===
seen={}
vals=[]
+ relativePhysicalPath = ()
have=seen.has_key
x=0
while x < 100:
@@ -456,13 +457,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