From 7e44c6837968499306a7ee4384f5a517932c9e8e Mon Sep 17 00:00:00 2001 From: Daniel Reis Date: Fri, 19 Sep 2014 15:19:01 +0100 Subject: [PATCH] Fix pylint on server_environment --- server_environment/serv_config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server_environment/serv_config.py b/server_environment/serv_config.py index 74964d336..55960e3c4 100644 --- a/server_environment/serv_config.py +++ b/server_environment/serv_config.py @@ -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