diff options
| author | Egor Tensin <egor@tensin.name> | 2026-08-06 13:07:27 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-08-06 13:08:45 +0200 |
| commit | d7c131e370306aff43ebbfe682df7ba64302d9f1 (patch) | |
| tree | 8581994225110a24d7faceb43ae4d06b0ed1cfeb /plugins/action/parse_json_file.py | |
| parent | Merge pull request #2 from egor-tensin/dependabot/github_actions/actions/setu... (diff) | |
| download | infra-ansible-d7c131e370306aff43ebbfe682df7ba64302d9f1.tar.gz infra-ansible-d7c131e370306aff43ebbfe682df7ba64302d9f1.zip | |
reformat Python code with default Black settings
Diffstat (limited to 'plugins/action/parse_json_file.py')
| -rwxr-xr-x | plugins/action/parse_json_file.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/action/parse_json_file.py b/plugins/action/parse_json_file.py index d9c864a..fe776a8 100755 --- a/plugins/action/parse_json_file.py +++ b/plugins/action/parse_json_file.py @@ -11,8 +11,8 @@ class ActionModule(ActionBase): def run(self, tmp=None, task_vars=None): result = super().run(tmp, task_vars) - path = self._task.args['path'] - default = self._task.args.get('default') + path = self._task.args["path"] + default = self._task.args.get("default") if default is not None: default = json.dumps(default) @@ -21,7 +21,7 @@ class ActionModule(ActionBase): try: content = json.loads(content) except json.JSONDecodeError as e: - raise AnsibleActionFail(f'Failed to parse JSON at {path}') from e + raise AnsibleActionFail(f"Failed to parse JSON at {path}") from e - result['content'] = content + result["content"] = content return result |
