aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2020-12-08 19:33:07 +0100
committerJake Hunsaker <jhunsake@redhat.com>2020-12-09 12:10:45 -0500
commit03642cf2e5619f11c762b63c61c9c69fb2b00cdf (patch)
tree0884fd6ecd3a68b7766f52d0a534645f90d74590
parent3fddddf8ea14436afdffadfb679411e03bf1ec61 (diff)
downloadsos-03642cf2e5619f11c762b63c61c9c69fb2b00cdf.tar.gz
[plugins] Dont stop collecting by empty specfile when sizelimit=0
When sizelimit=0, collecting an empty file would set limit_reached wrongly and stop collecting further files. Let fix this corner case. Resolves: #2330 Signed-off-by: Pavel Moravec <pmoravec@redhat.com> Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r--sos/report/plugins/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/report/plugins/__init__.py b/sos/report/plugins/__init__.py
index deb46c93..510e116e 100644
--- a/sos/report/plugins/__init__.py
+++ b/sos/report/plugins/__init__.py
@@ -1483,7 +1483,7 @@ class Plugin(object):
self._add_copy_paths([_file])
# in the corner case we just reached the sizelimit, we
# should collect the whole file and stop
- limit_reached = (current_size == sizelimit)
+ limit_reached = (sizelimit and current_size == sizelimit)
if self.manifest:
self.manifest.files.append({
'specification': copyspec,