mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Use raise from in plugins (#11095)
* Use raise from. * Add changelog fragment.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user