Kaydet (Commit) 6f7392ea authored tarafından Joffrey F's avatar Joffrey F

Do not allow bufsize to be 0 in NpipeSocket.makefile()

Signed-off-by: 's avatarJoffrey F <joffrey@docker.com>
üst 008730c6
......@@ -95,7 +95,7 @@ class NpipeSocket(object):
if mode.strip('b') != 'r':
raise NotImplementedError()
rawio = NpipeFileIOBase(self)
if bufsize is None or bufsize < 0:
if bufsize is None or bufsize <= 0:
bufsize = io.DEFAULT_BUFFER_SIZE
return io.BufferedReader(rawio, buffer_size=bufsize)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment