From 3524330e5d91663d399e054aa6f38dbda1dbd589 Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 25 Jan 2015 15:44:32 +0000 Subject: [PATCH] Fix idempotency when removing packages. If the package is already not present, then we have nothing to do. --- packaging/os/pkg5_publisher.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packaging/os/pkg5_publisher.py b/packaging/os/pkg5_publisher.py index 20b0c0a659c..2993c1107cc 100644 --- a/packaging/os/pkg5_publisher.py +++ b/packaging/os/pkg5_publisher.py @@ -140,6 +140,9 @@ def set_publisher(module, params): def unset_publisher(module, publisher): + if not publisher in get_publishers(module): + module.exit_json() + rc, out, err = module.run_command( ["pkg", "unset-publisher", publisher], check_rc=True