hide traceback on config validation failure
a fully traceback is needlessly scary. use --verbose to see the traceback.
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user