avocado.core.output: Honor --silent unconditionally

When passing --silent to the avocado command line,
stop emiting messages to the logging system altogether.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 6681f2d6
......@@ -376,13 +376,18 @@ class View(object):
:param msg: Message to write
:type msg: string
"""
if self.use_paginator:
if not skip_newline:
msg += '\n'
self.paginator.write(msg)
else:
extra = {'skip_newline': skip_newline}
self.console_log.log(level=level, msg=msg, extra=extra)
silent = False
if self.app_args is not None:
if hasattr(self.app_args, 'silent'):
silent = self.app_args.silent
if not silent:
if self.use_paginator:
if not skip_newline:
msg += '\n'
self.paginator.write(msg)
else:
extra = {'skip_newline': skip_newline}
self.console_log.log(level=level, msg=msg, extra=extra)
def _log_ui_info(self, msg, skip_newline=False):
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册