Commit efb939de authored by Marco Mariani's avatar Marco Mariani

enable full tracebacks by default

parent f5386a22
......@@ -10,7 +10,7 @@ class Command(cliff.command.Command):
parser = argparse.ArgumentParser(
description=self.get_description(),
prog=prog_name,
formatter_class=argparse.RawTextHelpFormatter
formatter_class=argparse.RawDescriptionHelpFormatter
)
return parser
......@@ -24,9 +24,10 @@ class SlapOSApp(cliff.app.App):
#
# self.options.verbose_level:
# -q -> 0
# -v -> 2
# -vv -> 3
# -q -> 0 (WARNING)
# -> 1 (INFO)
# -v -> 2 (DEBUG)
# -vv -> 3 (...)
# etc.
#
......@@ -39,6 +40,12 @@ class SlapOSApp(cliff.app.App):
command_manager=SlapOSCommandManager('slapos.cli'),
)
def build_option_parser(self, *args, **kw):
parser = super(SlapOSApp, self).build_option_parser(*args, **kw)
# always show tracebacks on errors
parser.set_defaults(debug=True)
return parser
def initialize_app(self, argv):
if self.options.verbose_level > 2:
self.log.debug('initialize_app')
......
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