[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/utility -
__init__.py:1.11
Jim Fulton
jim at zope.com
Sun Sep 21 13:31:09 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/services/utility
In directory cvs.zope.org:/tmp/cvs-serv12725/src/zope/app/browser/services/utility
Modified Files:
__init__.py
Log Message:
No-longer use IZopeContainer adapter.
=== Zope3/src/zope/app/browser/services/utility/__init__.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/browser/services/utility/__init__.py:1.10 Mon Aug 18 14:55:26 2003
+++ Zope3/src/zope/app/browser/services/utility/__init__.py Sun Sep 21 13:31:08 2003
@@ -18,7 +18,6 @@
from zope.app.browser.component.interfacewidget import InterfaceWidget
from zope.app.browser.services.registration import AddComponentRegistration
from zope.app.form.widget import CustomWidget
-from zope.app.interfaces.container import IZopeContainer
from zope.app.interfaces.services.registration import ActiveStatus
from zope.app.interfaces.services.registration import RegisteredStatus
from zope.app.interfaces.services.registration import UnregisteredStatus
@@ -151,16 +150,14 @@
conf.status = UnregisteredStatus
parent = zapi.getParent(conf)
name = zapi.getName(conf)
- container = zapi.getAdapter(parent, IZopeContainer)
- del container[name]
+ del parent[name]
# 2) Delete the service objects
for path, obj in services.items():
parent = zapi.getParent(obj)
name = zapi.getName(obj)
- container = zapi.getAdapter(parent, IZopeContainer)
- del container[name]
-
+ del parent[name]
+
s = _("Deleted: ${utility_names}")
s.mapping = {'utility_names': ", ".join(todo)}
return s
More information about the Zope3-Checkins
mailing list