mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
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:
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user