mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Check type before casting
This commit is contained in:
parent
03fa37b445
commit
1b12acd303
1 changed files with 2 additions and 1 deletions
|
@ -589,7 +589,8 @@ def set_value(hive,
|
|||
4: int, # REG_DWORD
|
||||
7: list, # REG_MULTI_SZ
|
||||
11: int} # REG_QWORD (unsupported)
|
||||
local_vdata = reg_type[vtype_value](local_vdata)
|
||||
if not isinstance(local_vdata, reg_type[vtype_value]):
|
||||
local_vdata = reg_type[vtype_value](local_vdata)
|
||||
|
||||
if volatile:
|
||||
create_options = registry.opttype['REG_OPTION_VOLATILE']
|
||||
|
|
Loading…
Add table
Reference in a new issue