diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-04-20 13:34:02 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-04-22 10:58:15 -0400 |
commit | 857da4e915c069e860f292774ece619c4211a5e6 (patch) | |
tree | 4a5cbb30e459bf0bc807b049c663db5d2cd43a1a | |
parent | 6a81e8d666a8f276833fa2e6a32a6047b2fd5790 (diff) | |
download | sos-857da4e915c069e860f292774ece619c4211a5e6.tar.gz |
[collect] Do not display local host if --no-local is used
Fixes an issue where even though we weren't collecting from local host
if --no-local was specified, we would still display it in the list of
nodes to collect from.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/collector/__init__.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sos/collector/__init__.py b/sos/collector/__init__.py index 177ccc0c..6f5ee165 100644 --- a/sos/collector/__init__.py +++ b/sos/collector/__init__.py @@ -738,8 +738,9 @@ class SoSCollector(SoSComponent): self.ui_log.info('The following is a list of nodes to collect from:') if self.master.connected and self.master.hostname is not None: - self.ui_log.info('\t%-*s' % (self.commons['hostlen'], - self.master.hostname)) + if not (self.master.local and self.opts.no_local): + self.ui_log.info('\t%-*s' % (self.commons['hostlen'], + self.master.hostname)) for node in sorted(self.node_list): self.ui_log.info("\t%-*s" % (self.commons['hostlen'], node)) |