mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
fixes issue with run_commands raising error (#17861)
The junos run_commands() method should raise an error when an RpcError is returned but didn't when using display=text. This fixes that error
This commit is contained in:
@@ -139,6 +139,9 @@ class Netconf(object):
|
||||
responses[index] = xml_to_json(responses[index])
|
||||
elif cmd.args.get('command_type') == 'rpc':
|
||||
responses[index] = str(responses[index].text).strip()
|
||||
elif 'RpcError' in responses[index]:
|
||||
raise NetworkError(responses[index])
|
||||
|
||||
|
||||
return responses
|
||||
|
||||
|
||||
Reference in New Issue
Block a user