[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/apidoc/component.py
	Not all classes which provides IFactory have a '_callable'
	attribute.
    Dmitry Vasiliev 
    dima at hlabs.spb.ru
       
    Mon Mar 21 05:57:10 EST 2005
    
    
  
Log message for revision 29609:
  Not all classes which provides IFactory have a '_callable' attribute.
  
Changed:
  U   Zope3/trunk/src/zope/app/apidoc/component.py
-=-
Modified: Zope3/trunk/src/zope/app/apidoc/component.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/component.py	2005-03-21 10:49:58 UTC (rev 29608)
+++ Zope3/trunk/src/zope/app/apidoc/component.py	2005-03-21 10:57:10 UTC (rev 29609)
@@ -190,9 +190,9 @@
 
     callable = factory
 
-    if IFactory.providedBy(factory):
+    # Usually only zope.component.factory.Factory instances have this attribute
+    if IFactory.providedBy(factory) and hasattr(factory, '_callable'):
         callable = factory._callable
-
     elif hasattr(callable, '__class__'):
         callable = callable.__class__
 
    
    
More information about the Zope3-Checkins
mailing list