[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl - RuntimeInfo.py:1.1.2.5.8.1
Jim Fulton
jim@zope.com
Wed, 29 May 2002 11:10:06 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl
In directory cvs.zope.org:/tmp/cvs-serv12181/lib/python/Zope/App/OFS/ApplicationControl
Modified Files:
Tag: Zope3InWonderland-branch
RuntimeInfo.py
Log Message:
- Added permission_id attribute to adapter and utility directives.
- Got rid of old getView, getResource, and getDefaultViewName.
Renamed getRequestView to getView (and so on).
Changed view interface to use context, rather than getContext.
Introduced notion of presentation types (e.g. IBrowserPresentation,
which is cleaner than IBrowserPublisher).
- Began converting to get/queryFoo, which is much nicer.
- Many formatting fixups.
=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/RuntimeInfo.py 1.1.2.5 => 1.1.2.5.8.1 ===
def __init__(self, context):
- self._context = context
-
- def getContext(self):
- return self._context
+ self.context = context
############################################################
# Implementation methods for interface
@@ -39,7 +36,7 @@
def getZopeVersion(self):
'See Zope.App.OFS.ApplicationControl.IRuntimeInfo.IRuntimeInfo'
try:
- version_utility = getUtility(self.getContext(), IZopeVersion)
+ version_utility = getUtility(self.context, IZopeVersion)
except ComponentLookupError:
return ""
return version_utility.getZopeVersion()
@@ -69,7 +66,7 @@
def getUptime(self):
'See Zope.App.OFS.ApplicationControl.IRuntimeInfo.IRuntimeInfo'
- return time.time() - self.getContext().getStartTime()
+ return time.time() - self.context.getStartTime()
#
############################################################