diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2022-11-21 10:23:32 -0500 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2022-11-21 14:19:17 -0500 |
commit | f596b912b3c52b3e101a880fdd1720df2412f4e1 (patch) | |
tree | 430f27e3ab41eae07592886bf98754b1d4230946 | |
parent | 41c36ff512a826cc078d4658423ec86da23a8d01 (diff) | |
download | sos-f596b912b3c52b3e101a880fdd1720df2412f4e1.tar.gz |
[report] Merge redundant conditional in calling `display_results()`
During our final processing to report the results of an archive to the
user at the end of an execution, there was a redundant conditional
checking if we were running with `--build` to decide how to call
`display_results()` (with or without stat information). Merge this into
the previous conditional that determines that stat information, which in
turn resolves a CodeQL error alert.
Related: #3066
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/report/__init__.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sos/report/__init__.py b/sos/report/__init__.py index 4098224b..178b8531 100644 --- a/sos/report/__init__.py +++ b/sos/report/__init__.py @@ -1656,9 +1656,8 @@ class SoSReport(SoSComponent): except (OSError, IOError): print(_("Error moving checksum file: %s" % archive_hash)) - if not self.opts.build: - self.policy.display_results(archive, directory, checksum, - archivestat, map_file=map_file) + self.policy.display_results(archive, directory, checksum, + archivestat, map_file=map_file) else: self.policy.display_results(archive, directory, checksum, map_file=map_file) |