Fixed exception handling a little more
This commit is contained in:
parent
83bc0a0071
commit
6691863466
|
|
@ -151,7 +151,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
|
||||||
"""Get the inventory from the Netbird API"""
|
"""Get the inventory from the Netbird API"""
|
||||||
try:
|
try:
|
||||||
self.peers = self.client.ListPeers()
|
self.peers = self.client.ListPeers()
|
||||||
except Exception as e:
|
except ConnectionRefusedError|ConnectionError as e:
|
||||||
raise AnsibleError from e
|
raise AnsibleError from e
|
||||||
|
|
||||||
def _filter_by_config(self):
|
def _filter_by_config(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue