[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/PathIndex - PathIndex.py:1.8

Andreas Jung andreas@zope.com
Wed, 3 Oct 2001 09:11:02 -0400


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/PathIndex
In directory cvs.zope.org:/tmp/cvs-serv7509

Modified Files:
	PathIndex.py 
Log Message:
made checks inside index_object() more robust


=== Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py 1.7 => 1.8 ===
         if hasattr(obj,self.id):
             f = getattr(obj,self.id)
-            if callable(f):
-                path = f()
-            else:
-                path = f
+
+            try:
+                if callable(f): path = f()
+                else:           path = f
+            except:
+                return 0
+
         else:             
 
             try: