mirror of
https://github.com/altlinux/gpupdate.git
synced 2025-03-21 18:50:38 +03:00
frontend/chromium_applier.py: added support for dictionaries as policy values
This commit is contained in:
parent
21b4ced721
commit
de0635952f
@ -24,7 +24,7 @@ from .applier_frontend import (
|
||||
import json
|
||||
import os
|
||||
from util.logging import log
|
||||
from util.util import is_machine_name
|
||||
from util.util import is_machine_name, string_to_literal_eval
|
||||
|
||||
class chromium_applier(applier_frontend):
|
||||
__module_name = 'ChromiumApplier'
|
||||
@ -65,7 +65,7 @@ class chromium_applier(applier_frontend):
|
||||
#Replacing all nested dictionaries with a list
|
||||
dict_item_to_list = (
|
||||
lambda target_dict :
|
||||
{key:[*val.values()] if type(val) == dict else val for key,val in target_dict.items()}
|
||||
{key:[*val.values()] if type(val) == dict else string_to_literal_eval(val) for key,val in target_dict.items()}
|
||||
)
|
||||
os.makedirs(self.__managed_policies_path, exist_ok=True)
|
||||
with open(destfile, 'w') as f:
|
||||
|
Loading…
x
Reference in New Issue
Block a user