Skip to content

Commit

Permalink
Fix #46 custom_properties - long chain are truncated
Browse files Browse the repository at this point in the history
  • Loading branch information
viczem committed Feb 9, 2023
1 parent 237f3a0 commit 47ebe2e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugins/lookup/keepass.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,14 @@ def _send(self, kp_soc, cmd, terms):
display.vvv("KeePass: %s %s" % (cmd, terms))
sock.send(_rq(cmd, *terms))

resp = sock.recv(1024).decode().splitlines()
data = b''
while True:
_ = sock.recv(1024)
data += _
if len(_) < 1024:
break

resp = data.decode().splitlines()
resp_len = len(resp)
if resp_len == 0:
raise AnsibleError("KeePass: '%s' result is empty" % cmd)
Expand Down

0 comments on commit 47ebe2e

Please sign in to comment.