diff options
author | Rene Moser <mail@renemoser.net> | 2014-01-16 10:48:35 +0100 |
---|---|---|
committer | Rene Moser <mail@renemoser.net> | 2014-01-16 11:05:12 +0100 |
commit | 849aab0a12e21947b82a0b5c9f8c8a9528557a96 (patch) | |
tree | 9430a62244933a1ade620e3a396bcd38abf71399 | |
parent | Merge pull request #5640 from willthames/ec2_elb_docs (diff) | |
download | ansible-849aab0a12e21947b82a0b5c9f8c8a9528557a96.tar.xz ansible-849aab0a12e21947b82a0b5c9f8c8a9528557a96.zip |
apt: fixed pkg=<name>=<version> fails if package is not yet installed.
Reported and patch provided by https://github.com/msolo. Closes GH-5625.
-rw-r--r-- | library/packaging/apt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/packaging/apt b/library/packaging/apt index eb64f8701f..f2c8d9ce4e 100644 --- a/library/packaging/apt +++ b/library/packaging/apt @@ -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: |