[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services - bundle.py:1.5
Guido van Rossum
guido@python.org
Mon, 16 Jun 2003 21:53:48 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/services
In directory cvs.zope.org:/tmp/cvs-serv30402
Modified Files:
bundle.py
Log Message:
Add transaction notes sating "activate bundle" or "deactivate bundle".
=== Zope3/src/zope/app/browser/services/bundle.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/bundle.py:1.4 Mon Jun 16 17:00:29 2003
+++ Zope3/src/zope/app/browser/services/bundle.py Mon Jun 16 21:53:47 2003
@@ -31,6 +31,7 @@
$Id$
"""
+from transaction import get_transaction
from zope.app import zapi
from zope.app.interfaces.container import IReadContainer
from zope.app.interfaces.services.configuration import IConfiguration
@@ -61,6 +62,8 @@
if obj.status != Unregistered:
obj.status = Unregistered
count += 1
+ if count:
+ get_transaction().note("deactivate bundle")
return "unregistered %d configurations" % count
activated = []
registered = []
@@ -88,6 +91,8 @@
s += "Activated: %s.\n" % (", ".join(activated))
if registered:
s += "Registered: %s.\n" % (", ".join(registered))
+ if s:
+ get_transaction().note("activate bundle")
return s
def listServices(self):