From 6691863466ba6669436e72eb204fac9071c79732 Mon Sep 17 00:00:00 2001 From: "Mark J. Horninger" Date: Sun, 10 Mar 2024 22:19:10 -0400 Subject: [PATCH] Fixed exception handling a little more --- plugins/inventory/netbird.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/netbird.py b/plugins/inventory/netbird.py index a708ee5..430119f 100644 --- a/plugins/inventory/netbird.py +++ b/plugins/inventory/netbird.py @@ -151,7 +151,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): """Get the inventory from the Netbird API""" try: self.peers = self.client.ListPeers() - except Exception as e: + except ConnectionRefusedError|ConnectionError as e: raise AnsibleError from e def _filter_by_config(self):