mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #30526 from twangboy/reg_flushkey
Added FlushKey to make sure it's changes are saved to disk
This commit is contained in:
commit
e366f6a7fd
1 changed files with 1 additions and 0 deletions
|
@ -361,6 +361,7 @@ def set_value(hive,
|
|||
or vtype == registry.vtype['REG_BINARY']:
|
||||
vdata = str(vdata)
|
||||
_winreg.SetValueEx(handle, vname, 0, vtype, vdata)
|
||||
_winreg.FlushKey(handle)
|
||||
_winreg.CloseKey(handle)
|
||||
return True
|
||||
except (WindowsError, ValueError, TypeError) as exc: # pylint: disable=E0602
|
||||
|
|
Loading…
Add table
Reference in a new issue