mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 18:50:21 -07:00
apt: fixed pkg=<name>=<version> fails if package is not yet installed.
Reported and patch provided by https://github.com/msolo. Closes GH-5625.
This commit is contained in:
parent
87e7b9e5cc
commit
849aab0a12
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,7 @@ def package_status(m, pkgname, version, cache, state):
|
||||||
# assume older version of python-apt is installed
|
# assume older version of python-apt is installed
|
||||||
package_is_installed = pkg.isInstalled
|
package_is_installed = pkg.isInstalled
|
||||||
|
|
||||||
if version:
|
if version and package_is_installed:
|
||||||
try:
|
try:
|
||||||
installed_version = pkg.installed.version
|
installed_version = pkg.installed.version
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue