Fixed win_path.py

Moved vdata and split to the same line
No need to check for string types
This commit is contained in:
twangboy 2015-10-16 09:36:12 -06:00
parent 16c0272849
commit 2bcac93314

View file

@ -74,11 +74,7 @@ def get_path():
'''
ret = __salt__['reg.read_value']('HKEY_LOCAL_MACHINE',
'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
'PATH')
if isinstance(ret, dict):
ret = ret['vdata'].split(';')
if isinstance(ret, str):
ret = ret.split(';')
'PATH')['vdata'].split(';')
# Trim ending backslash
return list(map(_normalize_dir, ret))