To resolve the issue of handling exception for Nios lookup gracefully (#44254)
* to resolve 43705 (#44078)
(cherry picked from commit 6a395d8e24
)
* adding changelog for backport
* adding new line
This commit is contained in:
parent
6d3db56c2a
commit
300aefcad2
2 changed files with 9 additions and 1 deletions
4
changelogs/fragments/nios_lookup_handle_exception.yaml
Normal file
4
changelogs/fragments/nios_lookup_handle_exception.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
bugfixes:
|
||||
- To resolve the issue of handling exception for Nios lookup gracefully.
|
||||
(https://github.com/ansible/ansible/pull/44078)
|
|
@ -149,7 +149,11 @@ class WapiBase(object):
|
|||
|
||||
class WapiLookup(WapiBase):
|
||||
''' Implements WapiBase for lookup plugins '''
|
||||
pass
|
||||
def handle_exception(self, method_name, exc):
|
||||
if ('text' in exc.response):
|
||||
raise Exception(exc.response['text'])
|
||||
else:
|
||||
raise Exception(exc)
|
||||
|
||||
|
||||
class WapiInventory(WapiBase):
|
||||
|
|
Loading…
Reference in a new issue