handle missed cmd.retcode statement

This commit is contained in:
Justin Findlay 2014-11-17 16:27:58 -07:00
parent 9c19014af7
commit c384dfa36f

View File

@ -623,8 +623,10 @@ def refresh_db(**kwargs):
}
branch_arg = _get_branch_option(**kwargs)
cmd = 'yum -q clean expire-cache && yum -q check-update {0}'.format(branch_arg)
ret = __salt__['cmd.retcode'](cmd, ignore_retcode=True)
clean_cmd = 'yum -q clean expire-cache'
__salt__['cmd.run'](clean_cmd)
update_cmd = 'yum -q check-update {0}'.format(branch_arg)
ret = __salt__['cmd.retcode'](update_cmd, ignore_retcode=True)
return retcodes.get(ret, False)