Fetchmail Module Error - WARNING:pop:local variable 'data' referenced before assignment

Bug #643994 reported by ferchu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

Using fetchmail module, if you configure an imap account, everything is ok. But if you configure a pop account, you obtain this error (from logger) when you try to fetch mails:

 WARNING:pop:local variable 'data' referenced before assignment

I think the problem is in the fetchmail.py file, line 157, because at this point OpenERP try to use de variable data without assign a value previously (unfourtunatly I dont know how to patch this!!!).

Working with trunk addons revision nro. 4944

Related branches

Revision history for this message
ferchu (fgb) wrote :

I could solve the problem by making the following change in fetchmail.py file (line 157):

original:
res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)

new:
res_id = email_tool.process_email(cr, uid, server.object_id.model, msg, attach=server.attach, context=context)

Now I can process mails with my pop account....

Changed in openobject-addons:
status: New → Invalid
status: Invalid → New
Changed in openobject-addons:
status: New → Confirmed
milestone: none → 6.0
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Fixed by revision 4951 <email address hidden> authored to Ferchu.
Thanks.

Changed in openobject-addons:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.