diff --git a/fido/fido.py b/fido/fido.py index 87c52ed9..93bee5bc 100755 --- a/fido/fido.py +++ b/fido/fido.py @@ -525,10 +525,10 @@ def get_buffers(self, stream, length=None, seekable=False): If length is None, return the length as found. If seekable is False, the steam does not support a seek operation. """ - bytes_to_read = self.bufsize if not length else min(length, self.bufsize) + bytes_to_read = self.bufsize if length is None else min(length, self.bufsize) bofbuffer = self.blocking_read(stream, bytes_to_read) bytes_read = len(bofbuffer) - if not length: + if length is None: # A stream with unknown length; have to keep two buffers around prevbuffer = bofbuffer while True: