diff options
| author | Nimesh (Open ERP) <nco@tinyerp.com> | 2012-12-10 12:57:23 +0530 |
|---|---|---|
| committer | Nimesh (Open ERP) <nco@tinyerp.com> | 2012-12-10 12:57:23 +0530 |
| commit | b969ecc49f47632681fae2885378a514b2f7980f (patch) | |
| tree | 602c088134d5d56e322d54fcf938a3e3d6d06535 /addons/fetchmail/fetchmail.py | |
| parent | c1ea2b82a17028a345fff60c75807f478cf6c2ac (diff) | |
| parent | 7f1d5daf2f7a137a470a4a72779408edf7995910 (diff) | |
[MERGE] with trunk
bzr revid: nco@tinyerp.com-20121210072723-avqvehqgnpxwdimj
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: |
