[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser - ServerControlView.py:1.1.2.6

Jim Fulton jim@zope.com
Mon, 10 Jun 2002 15:34:47 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv5490/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser

Modified Files:
      Tag: Zope-3x-branch
	ServerControlView.py 
Log Message:
Implemented 

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/IContainerPythonification

Along the way:

- Converted most uses of has_key to use in.

- Fixed a bug in Interface names and namesAndDescriptions methods 
  that caused base class attributes to be missed.



=== Zope3/lib/python/Zope/App/OFS/ApplicationControl/ServerControl/Views/Browser/ServerControlView.py 1.1.2.5 => 1.1.2.6 ===
           # XXX what are we going to do if this fails???
     
-    def action(self, REQUEST=None):
+    def action(self):
         """Do the shutdown/restart!"""
-        if REQUEST.has_key('restart'):
+        if 'restart' in self.request:
             return self.serverControl().restart() or "You restarted the server."
-        elif REQUEST.has_key('shutdown'):
+        elif 'shutdown' in self.request:
             return self.serverControl().shutdown() or \
             "You shut down the server."