diff options
| author | Olivier Dony <odo@openerp.com> | 2012-12-06 16:38:56 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2012-12-06 16:38:56 +0100 |
| commit | 5db87bea9ca535a53dfedd044c8563f3874078b3 (patch) | |
| tree | 6dbd5a1905415ed666a9e309494a8483bc420b20 /addons/fetchmail/fetchmail.py | |
| parent | 82e892bc536c3a8426b78e9a1962002a4be675c3 (diff) | |
| parent | 28e4d3a2864b4267673c123478c36c2dfe03a904 (diff) | |
[MERGE] Bugfixes from 6.1 until revision 6800
bzr revid: odo@openerp.com-20121206153856-9y9v8ok6yxo6l5f0
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: |
