diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2019-10-14 14:33:17 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2019-10-14 14:33:17 +0100 |
commit | fe245e86d6ace469b254b6dae397611858866605 (patch) | |
tree | 68cd83cce7680ebce90111052092397fa1f78d82 | |
parent | 57bd426b8484e1611cf2735a8d4a27050f6407b4 (diff) | |
download | sos-fe245e86d6ace469b254b6dae397611858866605.tar.gz |
[pcp] fix pmloger_ls output processing
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/pcp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sos/plugins/pcp.py b/sos/plugins/pcp.py index 841d466b..c3a7bf0a 100644 --- a/sos/plugins/pcp.py +++ b/sos/plugins/pcp.py @@ -128,8 +128,8 @@ class Pcp(Plugin, RedHatPlugin, DebianPlugin): path = os.path.join(self.pcp_log_dir, 'pmlogger', self.pcp_hostname, '*') pmlogger_ls = self.exec_cmd("ls -t1 %s" % path) - if pmlogger_ls: - for line in open(pmlogger_ls).read().splitlines(): + if pmlogger_ls['status'] == 0: + for line in open(pmlogger_ls['output']).read().splitlines(): self.add_copy_spec(line, sizelimit=0) files_collected = files_collected + 1 if self.countlimit and files_collected == self.countlimit: |