mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Check for all success return codes in dism state
Only checking for 0 returns a failure where a reboot is needed.
This commit is contained in:
parent
92dc7936ca
commit
0b95b85e69
1 changed files with 6 additions and 6 deletions
|
@ -83,7 +83,7 @@ def capability_installed(name,
|
|||
status = __salt__['dism.add_capability'](
|
||||
name, source, limit_access, image, restart)
|
||||
|
||||
if status['retcode'] != 0:
|
||||
if status['retcode'] not in [0, 1641, 3010]:
|
||||
ret['comment'] = 'Failed to install {0}: {1}'\
|
||||
.format(name, status['stdout'])
|
||||
ret['result'] = False
|
||||
|
@ -139,7 +139,7 @@ def capability_removed(name, image=None, restart=False):
|
|||
# Remove the capability
|
||||
status = __salt__['dism.remove_capability'](name, image, restart)
|
||||
|
||||
if status['retcode'] != 0:
|
||||
if status['retcode'] not in [0, 1641, 3010]:
|
||||
ret['comment'] = 'Failed to remove {0}: {1}' \
|
||||
.format(name, status['stdout'])
|
||||
ret['result'] = False
|
||||
|
@ -210,7 +210,7 @@ def feature_installed(name,
|
|||
status = __salt__['dism.add_feature'](
|
||||
name, package, source, limit_access, enable_parent, image, restart)
|
||||
|
||||
if status['retcode'] != 0:
|
||||
if status['retcode'] not in [0, 1641, 3010]:
|
||||
ret['comment'] = 'Failed to install {0}: {1}' \
|
||||
.format(name, status['stdout'])
|
||||
ret['result'] = False
|
||||
|
@ -270,7 +270,7 @@ def feature_removed(name, remove_payload=False, image=None, restart=False):
|
|||
status = __salt__['dism.remove_feature'](
|
||||
name, remove_payload, image, restart)
|
||||
|
||||
if status['retcode'] != 0:
|
||||
if status['retcode'] not in [0, 1641, 3010]:
|
||||
ret['comment'] = 'Failed to remove {0}: {1}' \
|
||||
.format(name, status['stdout'])
|
||||
ret['result'] = False
|
||||
|
@ -338,7 +338,7 @@ def package_installed(name,
|
|||
status = __salt__['dism.add_package'](
|
||||
name, ignore_check, prevent_pending, image, restart)
|
||||
|
||||
if status['retcode'] != 0:
|
||||
if status['retcode'] not in [0, 1641, 3010]:
|
||||
ret['comment'] = 'Failed to install {0}: {1}' \
|
||||
.format(name, status['stdout'])
|
||||
ret['result'] = False
|
||||
|
@ -407,7 +407,7 @@ def package_removed(name, image=None, restart=False):
|
|||
# Remove the package
|
||||
status = __salt__['dism.remove_package'](name, image, restart)
|
||||
|
||||
if status['retcode'] != 0:
|
||||
if status['retcode'] not in [0, 1641, 3010]:
|
||||
ret['comment'] = 'Failed to remove {0}: {1}' \
|
||||
.format(name, status['stdout'])
|
||||
ret['result'] = False
|
||||
|
|
Loading…
Add table
Reference in a new issue