[Zope-Checkins] CVS: ZODB3/ZEO - runsvr.py:1.16

Guido van Rossum guido@python.org
Mon, 25 Nov 2002 17:22:11 -0500


Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv25642

Modified Files:
	runsvr.py 
Log Message:
Catch ConfigurationErrors and turn them into usage() messages.


=== ZODB3/ZEO/runsvr.py 1.15 => 1.16 ===
--- ZODB3/ZEO/runsvr.py:1.15	Mon Nov 25 12:17:05 2002
+++ ZODB3/ZEO/runsvr.py	Mon Nov 25 17:22:10 2002
@@ -123,7 +123,10 @@
     def load_configuration(self):
         if self.rootconf or not self.configuration:
             return
-        self.rootconf = ZConfig.load(self.configuration)
+        try:
+            self.rootconf = ZConfig.load(self.configuration)
+        except ZConfig.Common.ConfigurationError, errobj:
+            self.usage(str(errobj))
 
     def help(self):
         """Print a long help message (self.doc) to stdout and exit(0).