Ensure targeted_pkgs always contains value for non-windows.

This commit is contained in:
Damon Atkins 2018-05-19 05:23:19 +10:00 committed by rallytime
parent 14659f9cad
commit f04b19b5b6
No known key found for this signature in database
GPG key ID: E8F1A4B90D0DEA19

View file

@ -2518,10 +2518,10 @@ def latest(
# upgrade the software to the latest. This is per the design.
# Build updated list of pkgs *with verion number*, exclude
# non-targeted ones
targeted_pkgs = [{x: targets[x]} for x in targets.keys()]
targeted_pkgs = [{x: targets[x]} for x in targets]
else:
# Build updated list of pkgs to exclude non-targeted ones
targeted_pkgs = list(targets.keys()) if pkgs else None
targeted_pkgs = list(targets)
# No need to refresh, if a refresh was necessary it would have been
# performed above when pkg.latest_version was run.