Merge lp:~serpent-consulting-services/openobject-addons/6.1-bugfix-1063251-SerpentCS into lp:openobject-addons/6.1

Proposed by Serpent Consulting Services
Status: Needs review
Proposed branch: lp:~serpent-consulting-services/openobject-addons/6.1-bugfix-1063251-SerpentCS
Merge into: lp:openobject-addons/6.1
Diff against target: 12 lines (+1/-1)
1 file modified
mail/mail_thread.py (+1/-1)
To merge this branch: bzr merge lp:~serpent-consulting-services/openobject-addons/6.1-bugfix-1063251-SerpentCS
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) (community) Needs Fixing
OpenERP Core Team Pending
Review via email: mp+128390@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

This was my first idea too.

But the problem is not that the key doesn't exist, the problem is that it exists and is False (nor None).

See https://code.launchpad.net/~hbrunn/openobject-addons/6.1_lp1107816

review: Needs Fixing

Unmerged revisions

7017. By Serpent Consulting Services

[FIX] mail : If a mail has no subject, fetchmail should assign No Subject and move on, rather crashing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail/mail_thread.py'
2--- mail/mail_thread.py 2012-08-10 11:48:38 +0000
3+++ mail/mail_thread.py 2012-10-07 17:45:26 +0000
4@@ -358,7 +358,7 @@
5 match = tools.reference_re.search(references)
6 if match: res_id = match.group(1)
7 if not res_id:
8- match = tools.res_re.search(msg['subject'])
9+ match = tools.res_re.search(msg.get('subject',_('No Subject')))
10 if match: res_id = match.group(1)
11 if res_id:
12 res_id = int(res_id)