[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/PathIndex - PathIndex.py:1.23
Andreas Jung
andreas@digicool.com
Tue, 21 May 2002 13:14:34 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/PathIndex
In directory cvs.zope.org:/tmp/cvs-serv15099
Modified Files:
PathIndex.py
Log Message:
the object hook/attribute can now return/be a tuple
(similiar to getPhysicalPath())
=== Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py 1.22 => 1.23 ===
""" hook for (Z)Catalog """
-
# first we check if the object provide an attribute or
# method to be used as hook for the PathIndex
@@ -112,9 +111,9 @@
except:
return 0
-
- if not isinstance(path,StringType):
- raise TypeError, "attribute/method must be string"
+ if not (isinstance(path,StringType) or
+ isinstance(path,TupleType)):
+ raise TypeError, "attribute/method must be/return string or tuple"
else: