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):
|
||||
return arg
|
||||
elif isinstance(arg, basestring):
|
||||
true_list = ['yes', 'true', 'on']
|
||||
for string in true_list:
|
||||
if arg.lower() == string:
|
||||
return True
|
||||
return False
|
||||
return arg.lower() in ['yes', 'true', 'on']
|
||||
else:
|
||||
logger.debug('arg should be a boolean or a string, got %r', arg)
|
||||
return True if arg else False
|
||||
|
|
Loading…
Add table
Reference in a new issue