[Zope3-checkins] CVS: Zope3/src/zope/app/event - __init__.py:1.5 subs.py:1.5

R. Sean Bowman sean.bowman@acm.org
Wed, 5 Feb 2003 23:31:15 -0500


Update of /cvs-repository/Zope3/src/zope/app/event
In directory cvs.zope.org:/tmp/cvs-serv8752/zope/app/event

Modified Files:
	__init__.py subs.py 
Log Message:
changed service names to use strings defined in
zope/component/servicenames.py, changed the name of
ErrorReportingService to ErrorReports


=== Zope3/src/zope/app/event/__init__.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/event/__init__.py:1.4	Mon Jan 27 13:16:20 2003
+++ Zope3/src/zope/app/event/__init__.py	Wed Feb  5 23:30:43 2003
@@ -18,11 +18,12 @@
 """
 
 from zope.component import getService
+from zope.component.servicenames import Events
 from zope.app.interfaces.event import IEvent
 from zope.app.event.globalservice import eventPublisher, checkEventType
 
 def getEventService(context): # the "publish" service
-    return getService(context, 'Events')
+    return getService(context, Events)
 
 def publish(context, event):
     return getEventService(context).publish(event)


=== Zope3/src/zope/app/event/subs.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/event/subs.py:1.4	Mon Feb  3 10:59:10 2003
+++ Zope3/src/zope/app/event/subs.py	Wed Feb  5 23:30:43 2003
@@ -32,6 +32,7 @@
 from zope.app.interfaces.event import ISubscribingAware
 
 from zope.component import getService, getAdapter, queryAdapter
+from zope.component.servicenames import HubIds
 from zope.app.services.type import PersistentTypeRegistry
 from cPickle import dumps, PicklingError
 import logging
@@ -485,7 +486,7 @@
     if isinstance(clean_reference, int):
         reftype = int
         hubId = clean_reference
-        hub = getService(context, "HubIds")
+        hub = getService(context, HubIds)
         try:
             wrappedobj = hub.getObject(hubId)
         except NotFoundError:
@@ -511,7 +512,7 @@
         else:
             cleanobj = removeAllProxies(wrappedobj)
             if allways:
-                hub = getService(context, 'HubIds')
+                hub = getService(context, HubIds)
                 try:
                     hubId = hub.getHubId(path)
                 except NotFoundError:
@@ -521,7 +522,7 @@
         wrappedobj = reference
         cleanobj = clean_reference
         path = getPhysicalPathString(wrappedobj)
-        hub = getService(context, "HubIds")
+        hub = getService(context, HubIds)
         try:
             hubId = hub.getHubId(path)
         except NotFoundError: