diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2018-06-21 15:25:14 -0400 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2018-06-21 20:31:32 +0100 |
commit | 6d09c48c1faa4e08d53c57124c19fa3c8ec9e8bd (patch) | |
tree | d09df877561e3ddad8320c2a089dfb6f02b24187 | |
parent | 4aae08aee6b1f49b5fe5a76079f1cae9a75b9b6b (diff) | |
download | sos-6d09c48c1faa4e08d53c57124c19fa3c8ec9e8bd.tar.gz |
[utilities] Ensure slots in deque is always integer
With python3, the 'slots' calculation returns a decimal number which
deque() will not accept, thus throwing an exception. Always make sure
slots is an integer value.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
-rw-r--r-- | sos/utilities.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/utilities.py b/sos/utilities.py index 7c749aec..42dceff6 100644 --- a/sos/utilities.py +++ b/sos/utilities.py @@ -209,7 +209,7 @@ class AsyncReader(threading.Thread): slots = None if sizelimit: sizelimit = sizelimit * 1048576 # convert to bytes - slots = sizelimit / self.chunksize + slots = int(sizelimit / self.chunksize) self.deque = deque(maxlen=slots) self.start() self.join() |