Closed jacky35 closed 8 years ago
@jacky35, thanks for the report.
Fix suggestion : edit salt/bin/Lib/site-packages/salt/modules/reg.py, line 151 ->
return str(read_value(hive=hkey,
key=path,
vname=key)['vdata'])
return str(read_value(hive=hkey, key=path)['vdata'])
It works better for me this way...
Warning Warning: edit salt/bin/Lib/site-packages/salt/modules/reg.py line 223:
def set_key(hkey, path, value, key=None, vtype='REG_DWORD', reflection=True):
This seems wrong (And broke my Environment key definitions) -> Wrong order for arguments (Key value inversion): It should be ->
def set_key(hkey, path, key=None, value=None, vtype='REG_DWORD', reflection=True):
PS : This is one of the 10 lines I got in my registry (PATH defined the wrong way... And hard to remove afterwards):
c:\forge\ant\bin;c:\forge\eclipse;c:\forge\tomcat8;c:\forge\sqldeveloper;c:\forge\sqlplus\instantclient_12_1;c:\forge\maven\bin;c:\forge\jdk8\bin;c:\programdata\oracle\java\javapath;c:\forge\java\jdk8\bin;c:\forge\eclipse\bin;c:\forge\sqlplus\bin;c:\\forge\maven\bin;c:\\forge\java\jdk8\bin;"c:\program files (x86)\easyphp-devserver-14.1vc11\binaries\php\php_runningversion";"c:\program files (x86)\vim\vim74" %groovy_home%\bin;c:\cygwin\bin;c:\cygwin\usr\sbin;c:\forge\python;c:\forge\python27;c:\forge\sqlplus;c:\forge\tortoisegit\bin;c:\forge\tortoisehg;c:\program files (x86)\calibre2;c:\windows\system32;c:\program files(x86)\notes;c:\program files\openvpn\bin;c:\program files\tortoisesvn\bin;c:\program files(x86)\lotus\notes;c:\program files\notes;c:\program files\lotus\notes;c:\tools;c:\program files (x86)\skype\phone=PATH
This bug is reproduced in 2015.8.0.
@NVoronchev This bug is fixed in 2015.8.1
@twangboy : Reproduced this issue in my setup with
salt-master --version
salt-master 2015.8.1 (Beryllium)
salt 'myminion' test.version
myminion:
2015.5.5
salt 'myminion' win_path.exists 'C:\Python27'
myminion:
The minion function caused an exception: Traceback (most recent call last):
File "c:\salt\bin\lib\site-packages\salt\minion.py", line 1173, in _thread_return
return_data = func(*args, **kwargs)
File "c:\salt\bin\lib\site-packages\salt\modules\win_path.py", line 100, in exists
sysPath = get_path()
File "c:\salt\bin\lib\site-packages\salt\modules\win_path.py", line 77, in get_path
'PATH').split(';')
AttributeError: 'dict' object has no attribute 'split'
NOTE: Path "C:\Python27" exists on myminion.
@sumitpandey1990 This bug is fixed in 2015.5.6
@twangboy : Thanks, I'll try and update.
@twangboy: it's working :+1:
Hello, There is a bug with the function "win_path.exists"
if you type : salt 'computer' win_path.exists 'C:\my_path'
All versions higher than Salt-Minion-2015.5.3 , will give this type of error message :
The minion function caused an exception: Traceback (most recent call last):
Good day, Jacky