[Zope3-checkins] CVS: Zope3/src/zope/app/startup - sitedefinition.py:1.10

Jim Fulton jim@zope.com
Fri, 28 Feb 2003 17:38:21 -0500


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

Modified Files:
	sitedefinition.py 
Log Message:
Fixed a bug that prevented running multiple servers of the same
type. I like running HTTP on multiple ports so I can test as a
privileged and an unprivileged user.


=== Zope3/src/zope/app/startup/sitedefinition.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/startup/sitedefinition.py:1.9	Tue Feb 25 16:49:24 2003
+++ Zope3/src/zope/app/startup/sitedefinition.py	Fri Feb 28 17:37:51 2003
@@ -77,7 +77,7 @@
 
         self._zodb = None
         self.useLog(_context)
-        self._servers = {}
+        self._servers = []
 
         self._started = 0
 
@@ -161,8 +161,7 @@
             else: verbose = 0
 
         if type is not None:
-            self._servers[type] = {'port': port,
-                                   'verbose': verbose}
+            self._servers.append((type, {'port': port, 'verbose': verbose}))
         else:
             sys.stderr.out('Warning: Server of Type %s does not exist. ' +
                            'Directive neglected.')
@@ -191,7 +190,7 @@
         self._initDB()
 
         # Start the servers
-        for type, server_info in self._servers.items():
+        for type, server_info in self._servers:
 
             server = getServerType(type)
             server.create(td, self._zodb, server_info['port'],