adds py3 compat changes to network_cli plugin (#18735)
now calculates StringIO receive buffer and if received data is less than buffer size, resets offset to 0
This commit is contained in:
parent
ea5c3df043
commit
8e562018ed
1 changed files with 2 additions and 1 deletions
|
@ -116,7 +116,8 @@ class Connection(_Connection):
|
|||
data = self._shell.recv(256)
|
||||
|
||||
recv.write(data)
|
||||
recv.seek(recv.tell() - 256)
|
||||
offset = recv.tell() - 256 if recv.tell() > 256 else 0
|
||||
recv.seek(offset)
|
||||
|
||||
window = self._strip(recv.read())
|
||||
|
||||
|
|
Loading…
Reference in a new issue