0

hide traceback on config validation failure

a fully traceback is needlessly scary.  use --verbose to see the
traceback.
This commit is contained in:
Andrew Chin
2012-05-01 20:38:14 -04:00
parent 9508573783
commit 216b26cbf2

View File

@@ -246,8 +246,12 @@ dir but you forgot to put quotes around the directory, since it contains spaces.
# Now parse and return the validated config # Now parse and return the validated config
try: try:
config = mw_parser.get_validated_config() config = mw_parser.get_validated_config()
except Exception: except Exception as ex:
if options.verbose:
logging.exception("An error was encountered with your configuration. See the info below.") logging.exception("An error was encountered with your configuration. See the info below.")
else: # no need to print scary traceback! just
logging.error("An error was encountered with your configuration.")
logging.error(str(ex))
return 1 return 1