Browse Source

Merge pull request #68 from nbessi/fix_pylint

Fix pylint tests
pull/71/head
Leonardo Pistone 10 years ago
parent
commit
247253bbce
  1. 2
      fetchmail_attach_from_folder/model/fetchmail_server.py
  2. 4
      mail_environment/env_mail.py
  3. 4
      server_environment/serv_config.py

2
fetchmail_attach_from_folder/model/fetchmail_server.py

@ -44,7 +44,7 @@ class fetchmail_server(Model):
def __init__(self, pool, cr):
self._columns['object_id'].required = False
return super(fetchmail_server, self).__init__(pool, cr)
super(fetchmail_server, self).__init__(pool, cr)
def onchange_server_type(
self, cr, uid, ids, server_type=False, ssl=False,

4
mail_environment/env_mail.py

@ -140,7 +140,9 @@ class FetchmailServer(osv.osv):
res[fetchmail.id] = config_vals
return res
def _type_search(self, cr, uid, obj, name, args, context={}):
def _type_search(self, cr, uid, obj, name, args, context=None):
if context is None:
context = self.pool['res.users'].context_get(cr, uid)
result_ids = []
# read all incomming servers values
all_ids = self.search(cr, uid, [], context=context)

4
server_environment/serv_config.py

@ -53,8 +53,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) # we copy original dict
res = _bool[getattr(obj, attr).lower()]
setattr(obj, attr, res)
return res

Loading…
Cancel
Save