Merge pull request #45327 from lomeroe/bp-44861_2016.11

Backport #44861 to 2016.11
This commit is contained in:
Nicole Thomas 2018-01-08 16:10:41 -05:00 committed by GitHub
commit 0959ae4ea3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2407,15 +2407,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):