[Zope3-checkins] SVN: Zope3/trunk/src/zope/component/__init__.py Removed IFactory check from provideAdapter and

Jim Fulton jim at zope.com
Sat Apr 16 14:46:18 EDT 2005


Log message for revision 30015:
  Removed IFactory check from provideAdapter and
  provideSubscriptionAdapter.
  

Changed:
  U   Zope3/trunk/src/zope/component/__init__.py

-=-
Modified: Zope3/trunk/src/zope/component/__init__.py
===================================================================
--- Zope3/trunk/src/zope/component/__init__.py	2005-04-16 16:52:11 UTC (rev 30014)
+++ Zope3/trunk/src/zope/component/__init__.py	2005-04-16 18:46:18 UTC (rev 30015)
@@ -315,10 +315,7 @@
 
 def provideAdapter(factory, adapts=None, provides=None, name=''):
     if provides is None:
-        if IFactory.providedBy(factory):
-            provides = factory.getInterfaces()
-        else:
-            provides = list(implementedBy(factory))
+        provides = list(implementedBy(factory))
         if len(provides) == 1:
             provides = provides[0]
         else:
@@ -334,10 +331,7 @@
 
 def provideSubscriptionAdapter(factory, adapts=None, provides=None):
     if provides is None:
-        if IFactory.providedBy(factory):
-            provides = factory.getInterfaces()
-        else:
-            provides = list(implementedBy(factory))
+        provides = list(implementedBy(factory))
         if len(provides) == 1:
             provides = provides[0]
         else:



More information about the Zope3-Checkins mailing list