Commit c2075900 authored by Guido van Rossum's avatar Guido van Rossum

Catch ConfigurationErrors and turn them into usage() messages.

parent e1af4ef1
...@@ -123,7 +123,10 @@ class Options: ...@@ -123,7 +123,10 @@ class Options:
def load_configuration(self): def load_configuration(self):
if self.rootconf or not self.configuration: if self.rootconf or not self.configuration:
return 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): def help(self):
"""Print a long help message (self.doc) to stdout and exit(0). """Print a long help message (self.doc) to stdout and exit(0).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment