[Zope3-checkins] CVS: Zope3/src/zope/app/site/browser -
__init__.py:1.6
Jim Fulton
jim at zope.com
Wed Mar 31 18:35:42 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/site/browser
In directory cvs.zope.org:/tmp/cvs-serv2806
Modified Files:
__init__.py
Log Message:
Changed a getFactory call to a getUtility call to avoid a deprecation
warning.
=== Zope3/src/zope/app/site/browser/__init__.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/site/browser/__init__.py:1.5 Fri Mar 19 15:26:36 2004
+++ Zope3/src/zope/app/site/browser/__init__.py Wed Mar 31 18:35:41 2004
@@ -31,6 +31,7 @@
from zope.app.site.service import SiteManager
from zope.app.component.nextservice import getNextServiceManager
from zope.component.service import IGlobalServiceManager
+from zope.component.interfaces import IFactory
from zope.interface.interfaces import IMethod
from zope.schema.interfaces import IField
from zope.app.interface.interfaces import IInterfaceBasedRegistry
@@ -86,7 +87,8 @@
if extra:
factoryname = extra.get('factory')
if factoryname:
- factory = zapi.getFactory(self.context, factoryname)
+ factory = zapi.getUtility(self.context, IFactory,
+ factoryname)
intf = factory.getInterfaces()
if not intf.extends(self._addFilterInterface):
# We only skip new addMenuItem style objects
More information about the Zope3-Checkins
mailing list