[Zope3-checkins] CVS: Zope3/src/zope/app/tests - setup.py:1.6

Jim Fulton jim at zope.com
Tue Sep 2 17:47:22 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/tests
In directory cvs.zope.org:/tmp/cvs-serv16881/src/zope/app/tests

Modified Files:
	setup.py 
Log Message:
Added ISite, which is a marker interface indicating that an object is
a site.

When an object is made into a site, ISite is declared for it.

Change to test whether something is a site by testing whether 
it (declares it) implements ISite.


=== Zope3/src/zope/app/tests/setup.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/tests/setup.py:1.5	Sat Jun 21 17:22:15 2003
+++ Zope3/src/zope/app/tests/setup.py	Tue Sep  2 16:46:51 2003
@@ -131,9 +131,10 @@
 
 
 from zope.app.services.service import ServiceManager
+from zope.app.interfaces.services.service import ISite
 def createServiceManager(folder):
-    if not folder.hasServiceManager():
-        folder.setServiceManager(ServiceManager())
+    if not ISite.isImplementedBy(folder):
+        folder.setSiteManager(ServiceManager())
 
     return zapi.traverse(folder, "++etc++site")
 




More information about the Zope3-Checkins mailing list