mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
50c445c356
commit
b0cd624aef
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue