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:
parent
1a82e93c6d
commit
2b4333a033
46 changed files with 218 additions and 165 deletions
|
|
@ -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."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue