Merge branch 'nightly' into python3

This commit is contained in:
JonnyWong16 2020-04-07 18:40:01 -07:00
commit d75744bb4a
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
2 changed files with 78 additions and 40 deletions

View file

@ -1290,8 +1290,10 @@ def mask_config_passwords(config):
return config
def bool_true(value):
if value is True or value == 1:
def bool_true(value, return_none=False):
if value is None and return_none:
return None
elif value is True or value == 1:
return True
elif isinstance(value, str) and value.lower() in ('1', 'true', 't', 'yes', 'y', 'on'):
return True