From 41060689f76cdc3d1e8ce7f995198efc4c5918d1 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 11 Jul 2014 17:14:16 +0200 Subject: [PATCH] [PEP8] server_environment --- server_environment/serv_config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server_environment/serv_config.py b/server_environment/serv_config.py index 6d9181818..033cc91fe 100644 --- a/server_environment/serv_config.py +++ b/server_environment/serv_config.py @@ -23,7 +23,7 @@ import os import ConfigParser from lxml import etree -from openerp.osv import osv, fields, orm +from openerp.osv import fields, orm from openerp.tools.config import config as system_base_config from .system_info import get_server_environment @@ -46,12 +46,13 @@ if not system_base_config.get('running_env', False): ck_path = os.path.join(_dir, system_base_config['running_env']) -if not os.path.exists(ck_path) : +if not os.path.exists(ck_path): raise Exception( "Provided server environment does not exist, " "please add a folder %s" % ck_path ) + def setboolean(obj, attr, _bool=_boolean_states): """Replace the attribute with a boolean.""" res = _bool[getattr(obj, attr).lower()] @@ -115,7 +116,7 @@ class ServerConfiguration(orm.TransientModel): _conf_defaults = _Defaults() def __init__(self, pool, cr): - res = super(ServerConfiguration, self).__init__(pool, cr) + super(ServerConfiguration, self).__init__(pool, cr) self.running_env = system_base_config['running_env'] # Only show passwords in development self.show_passwords = self.running_env in ('dev',) @@ -187,7 +188,6 @@ class ServerConfiguration(orm.TransientModel): res['fields'] = xfields return res - def default_get(self, cr, uid, fields_list, context=None): res = {} for key in self._conf_defaults: