mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
handle missed cmd.retcode statement
This commit is contained in:
parent
9c19014af7
commit
c384dfa36f
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user