diff options
author | Pavel Moravec <pmoravec@redhat.com> | 2017-09-24 13:48:44 +0200 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2017-11-01 11:42:28 +0000 |
commit | 2be61709f22363cf927d77b0977b5dae3a33a197 (patch) | |
tree | 1757c88c3e36f0ae24041d96b32950901fb5017b | |
parent | 1c6ed8fbb03cd64c2a93f2656d3ae9e342af8789 (diff) | |
download | sos-2be61709f22363cf927d77b0977b5dae3a33a197.tar.gz |
[plugins] Dont apply sizelimit if --all-logs option used
When --all-logs is used, ignore any sizelimits in add_copy_spec.
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 3 | ||||
-rw-r--r-- | tests/plugin_tests.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 540d4659..632e2f5f 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -517,6 +517,9 @@ class Plugin(object): file in a glob is too large it will be tailed to meet the sizelimit. """ + if self.get_option('all_logs'): + sizelimit = None + if sizelimit: sizelimit *= 1024 * 1024 # in MB diff --git a/tests/plugin_tests.py b/tests/plugin_tests.py index 3a7ce9c3..0ccea73b 100644 --- a/tests/plugin_tests.py +++ b/tests/plugin_tests.py @@ -90,7 +90,7 @@ class EnablerPlugin(Plugin): class MockOptions(object): - pass + all_logs = False class PluginToolTests(unittest.TestCase): |