made the wrapping of the error more pythonic

This commit is contained in:
Mark J. Horninger 2024-03-10 22:15:54 -04:00
parent 5247182191
commit 83bc0a0071
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable):
try: try:
self.peers = self.client.ListPeers() self.peers = self.client.ListPeers()
except Exception as e: except Exception as e:
raise AnsibleError(e) raise AnsibleError from e
def _filter_by_config(self): def _filter_by_config(self):
"""Filter peers by user specified configuration.""" """Filter peers by user specified configuration."""