1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

swupd: fail in case of an incorrect bundle (#45993)

For some strange reasons the 'swupd' module does not fail if I specify a
non-existing bundle like "xxx". This is inconsistent with other modules, for
example 'dnf'.

The end result is that if someone uses the 'package' module, the result is
inconsistent across OSes: for Fedora trying to install an non-existing module
fails, bot for Clear Linux it just prints a warning and succeeds.

This patch fixes the inconsistent behavior. With this patch 'swupd' will fail
if one tries to install a bundle that does not exist.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
Artem Bityutskiy 2018-10-26 11:13:03 +03:00 committed by John R Barker
parent 99ee30768a
commit b3ec97cd36

View file

@ -197,10 +197,6 @@ class Swupd(object):
self.msg = "Bundle %s installed" % bundle
return
if self.rc == 18:
self.msg = "Bundle name %s is invalid" % bundle
return
self.failed = True
self.msg = "Failed to install bundle %s" % bundle