mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix 'dict' object has no attribute split
Now first check if vdata exists in dict
This commit is contained in:
parent
2bfdd9724e
commit
5f1a9c46aa
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,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…
Add table
Reference in a new issue