Commit 849aab0a by Rene Moser

apt: fixed pkg=<name>=<version> fails if package is not yet installed.

Reported and patch provided by https://github.com/msolo. Closes GH-5625.
parent 87e7b9e5
......@@ -191,7 +191,7 @@ def package_status(m, pkgname, version, cache, state):
# assume older version of python-apt is installed
package_is_installed = pkg.isInstalled
if version:
if version and package_is_installed:
try:
installed_version = pkg.installed.version
except AttributeError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment