mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix problem when use_msiexec is a bool
This commit is contained in:
parent
4ecab68bb9
commit
0f31822a83
@ -842,15 +842,16 @@ def _get_msiexec(use_msiexec):
|
||||
Return if msiexec.exe will be used and the command to invoke it.
|
||||
'''
|
||||
if use_msiexec is False:
|
||||
return (False, '')
|
||||
if os.path.isfile(use_msiexec):
|
||||
return (True, use_msiexec)
|
||||
else:
|
||||
log.warning(("msiexec path '{0}' not found. Using system registered"
|
||||
" msiexec instead").format(use_msiexec))
|
||||
use_msiexec = True
|
||||
return False, ''
|
||||
if isinstance(use_msiexec, six.string_types):
|
||||
if os.path.isfile(use_msiexec):
|
||||
return True, use_msiexec
|
||||
else:
|
||||
log.warning(("msiexec path '{0}' not found. Using system registered"
|
||||
" msiexec instead").format(use_msiexec))
|
||||
use_msiexec = True
|
||||
if use_msiexec is True:
|
||||
return (True, 'msiexec')
|
||||
return True, 'msiexec'
|
||||
|
||||
|
||||
def install(name=None, refresh=False, pkgs=None, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user