Kaydet (Commit) 717ec945 authored tarafından Joffrey F's avatar Joffrey F Kaydeden (comit) GitHub

Merge pull request #1189 from docker/1188-npipesocket-makefile

Handle bufsize < 0 in makefile() as a substitute for default
...@@ -94,7 +94,7 @@ class NpipeSocket(object): ...@@ -94,7 +94,7 @@ class NpipeSocket(object):
if mode.strip('b') != 'r': if mode.strip('b') != 'r':
raise NotImplementedError() raise NotImplementedError()
rawio = NpipeFileIOBase(self) rawio = NpipeFileIOBase(self)
if bufsize is None: if bufsize is None or bufsize < 0:
bufsize = io.DEFAULT_BUFFER_SIZE bufsize = io.DEFAULT_BUFFER_SIZE
return io.BufferedReader(rawio, buffer_size=bufsize) 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