1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix idempotency issue for network modules. (#32838)

After the connection refactor if response value returned from
the remote device is empty in that case an `ok` return value is send
to module side code. To avoid this do not overwrite the empty response
received from remote device in `jsonrpc` reply.
This commit is contained in:
Ganesh Nalawade 2017-11-14 16:28:33 +05:30 committed by Ricardo Carrillo Cruz
parent 11de330372
commit 414eaefcb5

View file

@ -83,7 +83,7 @@ class JsonRpcServer(object):
def response(self, result=None):
response = self.header()
response['result'] = result or 'ok'
response['result'] = result
return response
def error(self, code, message, data=None):