aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2017-03-28 15:49:20 +0100
committerBryn M. Reeves <bmr@redhat.com>2017-03-28 15:49:20 +0100
commit3c7d3e1c1f6fe2d6df4ceb8facc0a9ea8c0abc38 (patch)
tree0c93b1a15e5e151c33c372457dd4c055fec481ac
parente963c0bab4ceabde01c92dd0f6cfe6616f676731 (diff)
downloadsos-3c7d3e1c1f6fe2d6df4ceb8facc0a9ea8c0abc38.tar.gz
[storageconsole] convert add_copy_spec_limit -> add_copy_spec
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/storageconsole.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/sos/plugins/storageconsole.py b/sos/plugins/storageconsole.py
index 9a9c4bcb..e67f07f5 100644
--- a/sos/plugins/storageconsole.py
+++ b/sos/plugins/storageconsole.py
@@ -25,20 +25,17 @@ class StorageConsole(Plugin, RedHatPlugin, DebianPlugin):
packages = ('rhscon-core',)
def setup(self):
- if not self.get_option("all_logs"):
- limit = self.get_option("log_size")
- else:
- limit = 0
-
- if limit:
- self.add_copy_spec_limit("/var/log/skyring/skyring.log", limit)
- self.add_copy_spec_limit("/var/log/skyring/bigfin.log", limit)
- self.add_copy_spec_limit("/var/log/carbon/console.log", limit)
- self.add_copy_spec_limit("/var/log/graphite-web/info.log", limit)
- self.add_copy_spec_limit(
+ all_logs = self.get_option("all_logs")
+ limit = self.get_option("log_size")
+
+ if not all_logs:
+ self.add_copy_spec([
+ "/var/log/skyring/skyring.log",
+ "/var/log/skyring/bigfin.log",
+ "/var/log/carbon/console.log",
+ "/var/log/graphite-web/info.log",
"/var/log/graphite-web/exception.log",
- limit
- )
+ ], sizelimit=limit)
else:
self.add_copy_spec([
"/var/log/skyring/",