From 83bc0a0071807d1f19b280ed8fe37e2e4bd7ab0a Mon Sep 17 00:00:00 2001 From: "Mark J. Horninger" Date: Sun, 10 Mar 2024 22:15:54 -0400 Subject: [PATCH] made the wrapping of the error more pythonic --- 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 738c851..a708ee5 100644 --- a/plugins/inventory/netbird.py +++ b/plugins/inventory/netbird.py @@ -152,7 +152,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): try: self.peers = self.client.ListPeers() except Exception as e: - raise AnsibleError(e) + raise AnsibleError from e def _filter_by_config(self): """Filter peers by user specified configuration."""