Fix pylint on server_environment

This commit is contained in:
Daniel Reis 2014-09-19 15:19:01 +01:00 committed by Stéphane Bidoul (ACSONE)
parent 4e2deaf914
commit caab02c6d0
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
1 changed files with 3 additions and 1 deletions

View File

@ -54,8 +54,10 @@ if not os.path.exists(ck_path):
)
def setboolean(obj, attr, _bool=_boolean_states):
def setboolean(obj, attr, _bool=None):
"""Replace the attribute with a boolean."""
if _bool is None:
_bool = dict(_boolean_states)
res = _bool[getattr(obj, attr).lower()]
setattr(obj, attr, res)
return res