[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/app/component/__init__.py don't test for an interface that not all local site managers might have

Philipp von Weitershausen philikon at philikon.de
Tue Apr 25 05:52:03 EDT 2006


Log message for revision 67588:
  don't test for an interface that not all local site managers might have
  (in Five they don't). Rather, see if we get the global site manager back
  or not.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/app/component/__init__.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/component/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/__init__.py	2006-04-25 09:19:37 UTC (rev 67587)
+++ Zope3/branches/jim-adapter/src/zope/app/component/__init__.py	2006-04-25 09:52:03 UTC (rev 67588)
@@ -17,7 +17,6 @@
 """
 __docformat__ = "reStructuredText"
 import zope.component
-import zope.app.component.interfaces
 
 _marker = object()
 
@@ -37,7 +36,7 @@
     `default` is returned.
     """
     sm = zope.component.getSiteManager(context)
-    if not zope.app.component.interfaces.ILocalSiteManager.providedBy(sm):
+    if sm is zope.component.getGlobalSiteManager():
         return default
 
     bases = sm.__bases__



More information about the Zope3-Checkins mailing list