mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #44861 from twangboy/win_fix_lgpo_invalid_value
Fix win_lgpo for unknown values
This commit is contained in:
commit
dc51174670
1 changed files with 11 additions and 8 deletions
|
@ -2435,15 +2435,18 @@ class _policy_info(object):
|
|||
'''
|
||||
converts a binary 0/1 to Disabled/Enabled
|
||||
'''
|
||||
if val is not None:
|
||||
if ord(val) == 0:
|
||||
return 'Disabled'
|
||||
elif ord(val) == 1:
|
||||
return 'Enabled'
|
||||
try:
|
||||
if val is not None:
|
||||
if ord(val) == 0:
|
||||
return 'Disabled'
|
||||
elif ord(val) == 1:
|
||||
return 'Enabled'
|
||||
else:
|
||||
return 'Invalid Value'
|
||||
else:
|
||||
return 'Invalid Value'
|
||||
else:
|
||||
return 'Not Defined'
|
||||
return 'Not Defined'
|
||||
except TypeError:
|
||||
return 'Invalid Value'
|
||||
|
||||
@classmethod
|
||||
def _binary_enable_zero_disable_one_reverse_conversion(cls, val, **kwargs):
|
||||
|
|
Loading…
Add table
Reference in a new issue