Fix idempotency when removing packages.
If the package is already not present, then we have nothing to do.
This commit is contained in:
parent
2eae1820ff
commit
3524330e5d
1 changed files with 3 additions and 0 deletions
|
@ -140,6 +140,9 @@ def set_publisher(module, params):
|
||||||
|
|
||||||
|
|
||||||
def unset_publisher(module, publisher):
|
def unset_publisher(module, publisher):
|
||||||
|
if not publisher in get_publishers(module):
|
||||||
|
module.exit_json()
|
||||||
|
|
||||||
rc, out, err = module.run_command(
|
rc, out, err = module.run_command(
|
||||||
["pkg", "unset-publisher", publisher],
|
["pkg", "unset-publisher", publisher],
|
||||||
check_rc=True
|
check_rc=True
|
||||||
|
|
Loading…
Reference in a new issue