[Zope3-checkins] CVS: Zope3/src/zope/component - __init__.py:1.11
Jim Fulton
jim@zope.com
Fri, 23 May 2003 18:16:50 -0400
Update of /cvs-repository/Zope3/src/zope/component
In directory cvs.zope.org:/tmp/cvs-serv19896/src/zope/component
Modified Files:
__init__.py
Log Message:
Changed the definition if all to use the interface implemented by the
module.
=== Zope3/src/zope/component/__init__.py 1.10 => 1.11 ===
--- Zope3/src/zope/component/__init__.py:1.10 Fri May 23 13:52:12 2003
+++ Zope3/src/zope/component/__init__.py Fri May 23 18:16:49 2003
@@ -33,37 +33,7 @@
return ob
moduleProvides(IComponentArchitecture)
-
-__all__ = (
- "queryServiceManager",
- "getServiceManager",
- "getService",
- "queryService",
- "getServiceDefinitions",
- "getUtility",
- "queryUtility",
- "getAdapter",
- "queryAdapter",
- "getNamedAdapter",
- "queryNamedAdapter",
- "createObject",
- "getFactory",
- "queryFactory",
- "getFactoryInterfaces",
- "getSkin",
- "getView",
- "queryView",
- "getDefaultViewName",
- "queryDefaultViewName",
- "getResource",
- "queryResource",
- )
-
-def queryServiceManager(context, default=None):
- try:
- return getServiceManager(context)
- except ComponentLookupError:
- return default
+__all__ = tuple(IComponentArchitecture)
def getServiceManager(context):
return serviceManager
@@ -73,9 +43,7 @@
return getServiceManager(context).getService(name)
def queryService(context, name, default=None):
- sm = queryServiceManager(context)
- if sm is None:
- return default
+ sm = getServiceManager(context)
return sm.queryService(name, default)
def getServiceDefinitions(context):