提交 3fb37c30 编写于 作者: L Lukáš Doktor 提交者: Cleber Rosa

avocado.core.app: Remove the early_logging hack

There was a hack to enable default streams when avocado failed to parse
arguments. This was necessary as --silent used to disable all output and
the user would have no idea of what went wrong. This behavior changed
and we always enable stderr leaving the user at least something to start
with. So instead of trying to be smart let's not surprise our users and
be consistent all the time.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 aa925be8
......@@ -57,14 +57,6 @@ class AvocadoApp(object):
self.cli_dispatcher.map_method('run', self.parser.args)
initialized = True
finally:
if (not initialized and
getattr(self.parser.args, "silent", False) is False):
if self.parser.args is None: # Early failure
import argparse
self.parser.args = argparse.Namespace()
STD_OUTPUT.enable_outputs()
STD_OUTPUT.print_records()
self.parser.args.show = ["app"]
output.reconfigure(self.parser.args)
def _print_plugin_failures(self):
......
......@@ -50,7 +50,7 @@ class Parser(object):
"""
def __init__(self):
self.args = None
self.args = argparse.Namespace()
self.subcommands = None
self.application = ArgumentParser(prog=PROG,
add_help=False, # see parent parsing
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册