Fix problem when use_msiexec is a bool

This commit is contained in:
twangboy 2017-05-08 14:01:01 -06:00
parent 4ecab68bb9
commit 0f31822a83

View File

@ -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):