diff options
| author | uco (OpenERP) <uco@tinyerp.com> | 2010-11-23 12:35:05 +0530 |
|---|---|---|
| committer | uco (OpenERP) <uco@tinyerp.com> | 2010-11-23 12:35:05 +0530 |
| commit | 6dd290e8245f4ea91ce87b0f3b5f29bafeaf12e9 (patch) | |
| tree | 81db1734d8400a9278e5669da35bbe90076397c0 /addons/fetchmail/fetchmail.py | |
| parent | 8035df3e1152a8f9d9703037d9d1bee718d94331 (diff) | |
[REF]: Replace the condition 'if not context' with 'if context is None'.
bzr revid: uco@tinyerp.com-20101123070505-9i2lrqhgxzaii3zn
Diffstat (limited to 'addons/fetchmail/fetchmail.py')
| -rw-r--r-- | addons/fetchmail/fetchmail.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py index 295f8813047..05363819e15 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -100,7 +100,7 @@ class email_server(osv.osv): return True def button_confirm_login(self, cr, uid, ids, context=None): - if not context: + if context is None: context = {} for server in self.browse(cr, uid, ids, context=context): logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name)) @@ -147,7 +147,7 @@ class email_server(osv.osv): return self.fetch_mail(cr, uid, ids, context=context) def fetch_mail(self, cr, uid, ids, context=None): - if not context: + if context is None: context = {} email_tool = self.pool.get('email.server.tools') action_pool = self.pool.get('ir.actions.server') @@ -209,7 +209,7 @@ class mailgate_message(osv.osv): _order = 'id desc' def create(self, cr, uid, values, context=None): - if not context: + if context is None: context={} server_id = context.get('server_id',False) server_type = context.get('server_type',False) @@ -221,7 +221,7 @@ class mailgate_message(osv.osv): return res def write(self, cr, uid, ids, values, context=None): - if not context: + if context is None: context={} server_id = context.get('server_id',False) server_type = context.get('server_type',False) |
