aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2019-04-10 14:09:57 -0400
committerBryn M. Reeves <bmr@redhat.com>2019-05-14 11:26:16 +0100
commit4263edec9ce6eeb67524e43033b6fae6608aa931 (patch)
tree2d6edcdfba3aa53583b058b442d37046cc251f5a
parent762765cfabb1ac62864f6a0552f7eda46112f9e1 (diff)
downloadsos-4263edec9ce6eeb67524e43033b6fae6608aa931.tar.gz
[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 <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/sosreport.py6
1 files 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()