From 4263edec9ce6eeb67524e43033b6fae6608aa931 Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Wed, 10 Apr 2019 14:09:57 -0400 Subject: [sosreport] Print header before policy initialization The version header is now printed before policy initialization as part of the SoSReport() constructor instead of in the execute() message. Fixes: #762 Resolves: #1644 Signed-off-by: Jake Hunsaker Signed-off-by: Bryn M. Reeves --- sos/sosreport.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sos/sosreport.py b/sos/sosreport.py index 058868c7..cd61b625 100644 --- a/sos/sosreport.py +++ b/sos/sosreport.py @@ -263,6 +263,8 @@ class SoSReport(object): except Exception: pass # not available in java, but we don't care + self.print_header() + # load default options and store them in self.opts parser = _get_parser() self.opts = SoSOptions().from_args(parser.parse_args([])) @@ -345,8 +347,7 @@ class SoSReport(object): self._exit(1) def print_header(self): - self.ui_log.info("\n%s\n" % _("sosreport (version %s)" % - (__version__,))) + print("\n%s\n" % _("sosreport (version %s)" % (__version__,))) def get_commons(self): return { @@ -1343,7 +1344,6 @@ class SoSReport(object): def execute(self): try: self.policy.set_commons(self.get_commons()) - self.print_header() self.load_plugins() self._set_all_options() self._set_tunables() -- cgit