Commit a601192b authored by Christopher Petrilli's avatar Christopher Petrilli

Fixed "loop over non sequence" bug in Catalog. This is from the

Collector entries #1766.  It's based on Darin Lee's patch, but
expanded to catch some other cases.
parent f00ae92a
...@@ -547,11 +547,16 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -547,11 +547,16 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
for k, intset in sort_index._index.items(): for k, intset in sort_index._index.items():
if type(rs) is IIBType: if type(rs) is IIBType:
intset=rs.intersection(intset) intset=rs.intersection(intset)
# Since we still have an IIBucket, let's convert
# it to its set of keys
intset=intset.keys()
else: else:
intset=intset.intersection(rs) intset=intset.intersection(rs)
if intset: if intset:
append((k,LazyMap(self.__getitem__, intset))) append((k,LazyMap(self.__getitem__, intset)))
else: else:
if type(rs) is IIBType:
rs=rs.keys()
for r in rs: for r in rs:
append((sort_index._unindex[r], append((sort_index._unindex[r],
LazyMap(self.__getitem__,[r]))) LazyMap(self.__getitem__,[r])))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment