1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

Use raise from in plugins (#11095)

* Use raise from.

* Add changelog fragment.
This commit is contained in:
Felix Fontein 2025-11-12 20:34:26 +01:00 committed by GitHub
parent 1a82e93c6d
commit 2b4333a033
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 218 additions and 165 deletions

View file

@ -124,7 +124,9 @@ class InventoryModule(BaseInventoryPlugin, Constructable):
# Create groups based on variable values and add the corresponding hosts to it
self._add_host_to_keyed_groups(self.get_option("keyed_groups"), host_attrs, host, strict=strict)
except Exception as e:
raise AnsibleParserError(f"Unable to fetch hosts from GitLab API, this was the original exception: {e}")
raise AnsibleParserError(
f"Unable to fetch hosts from GitLab API, this was the original exception: {e}"
) from e
def verify_file(self, path):
"""Return the possibly of a file being consumable by this plugin."""