Correct state pkg.updtodate to succeed when packages are up-to-date

When there are no packages to upgrade pkg.upgrade returns an empty dictionary
indicating that there were no changes - this should result in state
pkg.uptodate succeeding.
This commit is contained in:
Thayne Harbaugh 2015-10-23 19:09:42 -06:00 committed by rallytime
parent 72f0c106cf
commit cd58165138

View file

@ -1808,7 +1808,7 @@ def uptodate(name, refresh=False, **kwargs):
if updated.get('result') is False:
ret.update(updated)
elif updated:
elif updated or {} == updated:
ret['changes'] = updated
ret['comment'] = 'Upgrade successful.'
ret['result'] = True