1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-05-05 17:55:11 +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

@ -107,6 +107,6 @@ class LookupModule(LookupBase):
with open(path, "rb") as f:
result.append(base64.b64encode(f.read()).decode("utf-8"))
except Exception as exc:
raise AnsibleLookupError(f"Error while reading {path}: {exc}")
raise AnsibleLookupError(f"Error while reading {path}: {exc}") from exc
return result