Fix issue with detecting powershell

This commit is contained in:
twangboy 2018-01-23 10:38:28 -07:00
parent 2d1dd1186e
commit 3579534ea5
No known key found for this signature in database
GPG key ID: 93FF3BDEB278C9EB

View file

@ -2749,9 +2749,8 @@ def shell_info(shell, list_modules=False):
'HKEY_LOCAL_MACHINE',
'Software\\Microsoft\\PowerShell\\{0}'.format(reg_ver),
'Install')
if 'vtype' in install_data and \
install_data['vtype'] == 'REG_DWORD' and \
install_data['vdata'] == 1:
if install_data.get('vtype') == 'REG_DWORD' and \
install_data.get('vdata') == salt.utils.to_unicode(1, 'mbcs'):
details = __salt__['reg.list_values'](
'HKEY_LOCAL_MACHINE',
'Software\\Microsoft\\PowerShell\\{0}\\'