mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix py3 issue
This commit is contained in:
parent
019169ed61
commit
1c0ec79cd1
1 changed files with 3 additions and 2 deletions
|
@ -3502,7 +3502,7 @@ def _processValueItem(element, reg_key, reg_valuename, policy, parent_element,
|
|||
reg_key,
|
||||
reg_valuename,
|
||||
chr(registry.vtype[this_vtype]),
|
||||
six.unichr(len(this_element_value.encode('utf-16-le'))),
|
||||
six.unichr(len(this_element_value.encode('utf-16-le', '' if six.PY2 else 'surrogatepass'))),
|
||||
this_element_value)
|
||||
return expected_string
|
||||
|
||||
|
@ -4242,7 +4242,8 @@ def _writeAdminTemplateRegPolFile(admtemplate_data,
|
|||
for adm_namespace in admtemplate_data:
|
||||
for adm_policy in admtemplate_data[adm_namespace]:
|
||||
if str(admtemplate_data[adm_namespace][adm_policy]).lower() == 'not configured':
|
||||
if adm_policy in base_policy_settings[adm_namespace]:
|
||||
if adm_policy in base_policy_settings.get(adm_namespace, {}):
|
||||
log.debug('Policy "{0}" removed'.format(adm_policy))
|
||||
base_policy_settings[adm_namespace].pop(adm_policy)
|
||||
else:
|
||||
log.debug('adding {0} to base_policy_settings'.format(adm_policy))
|
||||
|
|
Loading…
Add table
Reference in a new issue