[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services - bundle.py:1.8

Guido van Rossum guido@python.org
Thu, 19 Jun 2003 17:56:15 -0400


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

Modified Files:
	bundle.py 
Log Message:
Add a simple string attribute (typically a class variable)
'serviceType' to the IConfiguration interface, so that the bundle code
can legally get at this information, which it needs to call that
service's queryConfigurationsFor() method.  Remove this info from the
ConfigurationStatusProperty class and constructor signature; this
class now gets this info from its configuration argument.



=== Zope3/src/zope/app/browser/services/bundle.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/services/bundle.py:1.7	Thu Jun 19 17:33:01 2003
+++ Zope3/src/zope/app/browser/services/bundle.py	Thu Jun 19 17:55:45 2003
@@ -295,12 +295,4 @@
 
     def getServiceName(self, configuration):
         # Return the service associated with a configuration.
-
-        # XXX There is no public API to get this information; while I
-        # ponder how to define such an API, I use a hack: all current
-        # configuration implementations use the
-        # ConfigurationStatusProperty class, and it stores the service
-        # name on its 'service' attribute.  We can get to this via the
-        # class.
-        configuration = removeAllProxies(configuration)
-        return configuration.__class__.status.service
+        return configuration.serviceType