Merge pull request #34898 from hrumph/list_upgrades_refresh

Stop multiple refreshes during call to pkg.list_upgrades
This commit is contained in:
Mike Place 2016-07-22 16:28:42 -06:00 committed by GitHub
commit 6ccc27f697

View File

@ -155,7 +155,7 @@ def list_upgrades(refresh=True, **kwargs): # pylint: disable=W0613
ret = {} ret = {}
for name, data in six.iteritems(get_repo_data().get('repo', {})): for name, data in six.iteritems(get_repo_data().get('repo', {})):
if version(name): if version(name):
latest = latest_version(name) latest = latest_version(name, refresh=False)
if latest: if latest:
ret[name] = latest ret[name] = latest
return ret return ret