Fix ShellReadable.read method when resulting chunk is None
Change-Id: Iaac28fe7ab9e89898798977cbca2ed4813489d7c
This commit is contained in:
parent
0826bec368
commit
0ab38a8318
|
@ -88,7 +88,7 @@ class ShellReadable(ShellIOBase):
|
|||
def read(self, size: int = None) -> bytes:
|
||||
size = size or self.buffer_size
|
||||
try:
|
||||
chunk = self.delegate.read(size)
|
||||
chunk: bytes = self.delegate.read(size) or b''
|
||||
except IOError:
|
||||
LOG.exception('Error reading from %r', self)
|
||||
try:
|
||||
|
@ -99,8 +99,6 @@ class ShellReadable(ShellIOBase):
|
|||
|
||||
if chunk:
|
||||
self._data_chunks.append(chunk)
|
||||
elif chunk is None:
|
||||
chunk = 'b'
|
||||
return chunk
|
||||
|
||||
@property
|
||||
|
|
Loading…
Reference in New Issue