[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/servicemodule - __init__.py:1.6

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Mar 28 18:40:57 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/apidoc/servicemodule
In directory cvs.zope.org:/tmp/cvs-serv22756/src/zope/app/apidoc/servicemodule

Modified Files:
	__init__.py 
Log Message:


Use 'servicenames' module for service names.




=== Zope3/src/zope/app/apidoc/servicemodule/__init__.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/apidoc/servicemodule/__init__.py:1.5	Tue Mar  9 07:39:03 2004
+++ Zope3/src/zope/app/apidoc/servicemodule/__init__.py	Sun Mar 28 18:40:56 2004
@@ -22,6 +22,7 @@
 from zope.app.location.interfaces import ILocation
 from zope.app.apidoc.interfaces import IDocumentationModule
 from zope.app.apidoc.utilities import ReadContainerBase
+from zope.app.servicenames import Services
 
 class Service(object):
     """Object representing a service in the API documentation"""
@@ -29,6 +30,7 @@
     implements(ILocation)
 
     def __init__(self, parent, name, iface, impl):
+        """Initialize Service object."""
         self.__parent__ = parent
         self.__name__ = name
         self.interface = iface
@@ -90,7 +92,7 @@
 
     def get(self, key, default=None):
         """See zope.app.container.interfaces.IReadContainer"""
-        service = zapi.getService(self, 'Services')        
+        service = zapi.getService(self, Services)
         items = service.getServiceDefinitions()
 
         for name, iface in items:
@@ -105,7 +107,7 @@
 
     def items(self):
         """See zope.app.container.interfaces.IReadContainer"""
-        service = zapi.getService(self, 'Services')
+        service = zapi.getService(self, Services)
         items = service.getServiceDefinitions()
         items.sort()
         return [(name, self.get(name)) for name, iface in items]




More information about the Zope3-Checkins mailing list