Merge pull request #45911 from twangboy/win_fix_lgpo_unicode

LGPO Module: Convert reg values to unicode for debug
This commit is contained in:
Nicole Thomas 2018-02-21 14:02:16 -05:00 committed by GitHub
commit 11e5e8eb86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2442,7 +2442,7 @@ class _policy_info(object):
elif ord(val) == 1:
return 'Enabled'
else:
return 'Invalid Value'
return 'Invalid Value: {0!r}'.format(val) # pylint: disable=repr-flag-used-in-string
else:
return 'Not Defined'
except TypeError:
@ -5047,7 +5047,10 @@ def get(policy_class=None, return_full_policy_names=True,
class_vals[policy_name] = __salt__['reg.read_value'](_pol['Registry']['Hive'],
_pol['Registry']['Path'],
_pol['Registry']['Value'])['vdata']
log.debug('Value {0} found for reg policy {1}'.format(class_vals[policy_name], policy_name))
log.debug(
'Value %r found for reg policy %s',
class_vals[policy_name], policy_name
)
elif 'Secedit' in _pol:
# get value from secedit
_ret, _val = _findOptionValueInSeceditFile(_pol['Secedit']['Option'])