diff options
author | Yedidyah Bar David <didi@redhat.com> | 2018-12-04 13:08:44 +0200 |
---|---|---|
committer | Yedidyah Bar David <didi@redhat.com> | 2018-12-04 13:22:03 +0200 |
commit | 47e6b3d92c8a13560b248e6f0e2ffb334b547d07 (patch) | |
tree | 85fc4ce69d318e4086d7a53872f978b762bc4373 | |
parent | 848b110f83697814c72ac93b36e786ff9dafc0fc (diff) | |
download | sos-47e6b3d92c8a13560b248e6f0e2ffb334b547d07.tar.gz |
[Plugin] Obey sizelimit=0
If sizelimit is 0, do not limit. Only use the default if it's None.
Bug-Url: https://bugzilla.redhat.com/1654068
Signed-off-by: Yedidyah Bar David <didi@redhat.com>
-rw-r--r-- | sos/plugins/__init__.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py index 7d2a8b2d..97f3cc59 100644 --- a/sos/plugins/__init__.py +++ b/sos/plugins/__init__.py @@ -569,7 +569,8 @@ class Plugin(object): a single file the file will be tailed to meet sizelimit. If the first file in a glob is too large it will be tailed to meet the sizelimit. """ - sizelimit = sizelimit or self.get_option("log_size") + if sizelimit is None: + sizelimit = self.get_option("log_size") if self.get_option('all_logs'): sizelimit = None @@ -703,7 +704,8 @@ class Plugin(object): cmds = [cmds] if len(cmds) > 1 and (suggest_filename or root_symlink): self._log_warn("ambiguous filename or symlink for command list") - sizelimit = sizelimit or self.get_option("log_size") + if sizelimit is None: + sizelimit = self.get_option("log_size") for cmd in cmds: self._add_cmd_output(cmd, suggest_filename=suggest_filename, root_symlink=root_symlink, timeout=timeout, |