[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser - resource.py:1.8

Sidnei da Silva sidnei at x3ng.com.br
Wed Sep 24 13:32:00 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser
In directory cvs.zope.org:/tmp/cvs-serv10935/src/zope/app/publisher/browser

Modified Files:
	resource.py 
Log Message:
Woops. My fix broke the whole resource thing, but all tests passed! Better fix with a test to make sure it doesnt break again

=== Zope3/src/zope/app/publisher/browser/resource.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/publisher/browser/resource.py:1.7	Wed Sep 24 13:22:07 2003
+++ Zope3/src/zope/app/publisher/browser/resource.py	Wed Sep 24 13:31:29 2003
@@ -21,10 +21,13 @@
 from zope.app.location import Location
 from zope.app.interfaces.services.service import ISite
 from zope.app.interfaces.traversing import IContainmentRoot
-from zope.component.interfaces import IResourceService
+from zope.component.interfaces import IResourceService, IResource
+from zope.interface import implements
 
 class Resource(Location):
 
+    implements(IResource)
+
     def __init__(self, request):
         self.request = request
 
@@ -42,7 +45,7 @@
             if IContainmentRoot.isImplementedBy(site):
                 site = None
                 break
-            if site.__name__:
+            if IResource.isImplementedBy(site) and site.__name__:
                 names.append(site.__name__)
             site = site.__parent__
 




More information about the Zope3-Checkins mailing list