diff options
| author | Nimesh (Open ERP) <nco@tinyerp.com> | 2012-12-10 12:38:25 +0530 |
|---|---|---|
| committer | Nimesh (Open ERP) <nco@tinyerp.com> | 2012-12-10 12:38:25 +0530 |
| commit | 504f10c220cffa9d19caa4846b261ae7c8dbc1ce (patch) | |
| tree | 7d391f9f23543c827ba97e41a1297a5ebc3969d2 /addons/fetchmail/fetchmail.py | |
| parent | 3defbc23a130b411997dea30f52d0c78e9cfff07 (diff) | |
| parent | 7f1d5daf2f7a137a470a4a72779408edf7995910 (diff) | |
[MERGE] with trunk
bzr revid: nco@tinyerp.com-20121210070825-5rgigvkb1nb3hu30
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 68f05dfeee2..e5cd70948cd 100644 --- a/addons/fetchmail/fetchmail.py +++ b/addons/fetchmail/fetchmail.py @@ -195,12 +195,12 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS strip_attachments=(not server.attach), context=context) if res_id and server.action_id: - action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", False)}) + action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", server.object_id.model)}) imap_server.store(num, '+FLAGS', '\\Seen') cr.commit() count += 1 _logger.info("fetched/processed %s email(s) on %s server %s", count, server.type, server.name) - except Exception, e: + except Exception: _logger.exception("Failed to fetch mail from %s server %s.", server.type, server.name) finally: if imap_server: @@ -220,11 +220,11 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS strip_attachments=(not server.attach), context=context) if res_id and server.action_id: - action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", False)}) + action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id], 'active_model': context.get("thread_model", server.object_id.model)}) pop_server.dele(num) cr.commit() _logger.info("fetched/processed %s email(s) on %s server %s", numMsgs, server.type, server.name) - except Exception, e: + except Exception: _logger.exception("Failed to fetch mail from %s server %s.", server.type, server.name) finally: if pop_server: |
