diff --git a/README.md b/README.md index 7e4466a..ab6921a 100644 --- a/README.md +++ b/README.md @@ -97,3 +97,4 @@ or the latest [changelog.yaml](changelogs/changelog.yaml). - Andrew Arensburger ([@arensb](https://mastodon.social/@arensb)) - Ed Hull (https://github.com/edhull) - Mozzie (https://github.com/MozzieBytes) +- bmarinov (https://github.com/bmarinov) diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 1b6135b..3f6b45c 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -164,3 +164,12 @@ releases: fragments: - sharing-nfs.yml release_date: '2024-05-17' + 1.9.5: + changes: + bugfixes: + - The ``pool_scrub_task`` module would crash when invoked with a nonexistent + pool name. Fix contributed by bmarinov. + release_summary: bug fix + fragments: + - pool-scrub-json.yaml + release_date: '2024-05-29' diff --git a/galaxy.yml b/galaxy.yml index 985d7ec..10a2b2f 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -8,7 +8,7 @@ namespace: arensb name: truenas # The version of the collection. Must be compatible with semantic versioning -version: 1.9.4 +version: 1.9.5 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md diff --git a/plugins/modules/pool_scrub_task.py b/plugins/modules/pool_scrub_task.py index 9e84385..52d6c70 100644 --- a/plugins/modules/pool_scrub_task.py +++ b/plugins/modules/pool_scrub_task.py @@ -183,11 +183,11 @@ def main(): [["name", "=", pool]]) if len(pool_info) == 0: # No such pool - module.json_fail(msg="Error: no such pool: {pool}") + module.fail_json(msg="Error: no such pool: {pool}") else: pool_info = pool_info[0] except Exception as e: - module.json_fail(msg=f"Error looking up pool {pool}: {e}") + module.fail_json(msg=f"Error looking up pool {pool}: {e}") arg['pool'] = pool_info['id']