mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Carry over fixes from @alexAubin
Lost during the rebasing but revived!
This commit is contained in:
parent
74a5979e91
commit
c15311f7e7
1 changed files with 1 additions and 5 deletions
|
@ -2903,11 +2903,7 @@ def is_true(arg):
|
||||||
if isinstance(arg, bool):
|
if isinstance(arg, bool):
|
||||||
return arg
|
return arg
|
||||||
elif isinstance(arg, basestring):
|
elif isinstance(arg, basestring):
|
||||||
true_list = ['yes', 'true', 'on']
|
return arg.lower() in ['yes', 'true', 'on']
|
||||||
for string in true_list:
|
|
||||||
if arg.lower() == string:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
else:
|
else:
|
||||||
logger.debug('arg should be a boolean or a string, got %r', arg)
|
logger.debug('arg should be a boolean or a string, got %r', arg)
|
||||||
return True if arg else False
|
return True if arg else False
|
||||||
|
|
Loading…
Add table
Reference in a new issue