Removed unused buf_size argument to LimitedStream().

Unused since its introduction in 269e921756.
This commit is contained in:
Nick Pope 2022-01-18 04:55:14 +00:00 committed by GitHub
parent 30a0144134
commit fac26684fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -14,11 +14,10 @@ _slashes_re = _lazy_re_compile(br'/+')
class LimitedStream:
"""Wrap another stream to disallow reading it past a number of bytes."""
def __init__(self, stream, limit, buf_size=64 * 1024 * 1024):
def __init__(self, stream, limit):
self.stream = stream
self.remaining = limit
self.buffer = b''
self.buf_size = buf_size
def _read_limited(self, size=None):
if size is None or size > self.remaining: