[Zope-Checkins] CVS: Zope/lib/python/OFS - ObjectManager.py:1.145.16.2
Shane Hathaway
shane@cvs.zope.org
Fri, 12 Apr 2002 15:34:11 -0400
Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv14684
Modified Files:
Tag: Zope-2_5-branch
ObjectManager.py
Log Message:
Collector #167: made superValues() include items with duplicated IDs.
=== Zope/lib/python/OFS/ObjectManager.py 1.145.16.1 => 1.145.16.2 ===
seen={}
vals=[]
+ relativePhysicalPath = ()
have=seen.has_key
x=0
while x < 100:
@@ -399,13 +400,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