mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
eos_l2_interface handle "Interface does not exist" (#56787)
* Quick and dirty attempt to handle eapi error * Well this should probably change * Hopefully this works correctly? * Fix check_rc handling with httpapi * Add tests that should hopefully cover the error * Fix warnings * Improve tests
This commit is contained in:
committed by
Nilashish Chakraborty
parent
5005c353ef
commit
cebb363fcc
@@ -449,10 +449,10 @@ class HttpApi:
|
||||
def run_queue(queue, output):
|
||||
try:
|
||||
response = to_list(self._connection.send_request(queue, output=output))
|
||||
except Exception as exc:
|
||||
except ConnectionError as exc:
|
||||
if check_rc:
|
||||
raise
|
||||
return to_text(exc)
|
||||
return to_list(to_text(exc))
|
||||
|
||||
if output == 'json':
|
||||
response = [json.loads(item) for item in response]
|
||||
|
||||
Reference in New Issue
Block a user