mirror of
https://github.com/valitydev/salt.git
synced 2024-11-09 01:36:48 +00:00
Fix 'dict' object has no attribute split
Now first check if vdata exists in dict
This commit is contained in:
parent
083a2bdf93
commit
e927009c37
@ -76,7 +76,8 @@ def get_path():
|
||||
ret = __salt__['reg.read_key']('HKEY_LOCAL_MACHINE',
|
||||
'SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment',
|
||||
'PATH')
|
||||
ret = ret['vdata'].split(';')
|
||||
if 'vdata' in ret.keys():
|
||||
ret = ret['vdata'].split(';')
|
||||
|
||||
# Trim ending backslash
|
||||
return list(map(_normalize_dir, ret))
|
||||
|
Loading…
Reference in New Issue
Block a user