Merge lp://qastaging/~sylvain-calador/poweremail/download-full-email into lp://qastaging/poweremail/trunk

Proposed by Sylvain Calador
Status: Merged
Merged at revision: not available
Proposed branch: lp://qastaging/~sylvain-calador/poweremail/download-full-email
Merge into: lp://qastaging/poweremail/trunk
Diff against target: 29 lines (+6/-6)
1 file modified
poweremail_core.py (+6/-6)
To merge this branch: bzr merge lp://qastaging/~sylvain-calador/poweremail/download-full-email
Reviewer Review Type Date Requested Status
Sharoon Thomas http://openlabs.co.in Approve
Review via email: mp+15755@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Sylvain Calador (sylvain-calador) wrote :

Download email more than once raise TypeError: 'bool' object is unsubscriptable
This i a fix for this issue.

Best Regards,

Sylvain

Revision history for this message
Sharoon Thomas http://openlabs.co.in (sharoonthomas) wrote :

I am approving the merge.

Thanks for reporting the bug.. and fixing it

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'poweremail_core.py'
2--- poweremail_core.py 2009-12-07 15:00:55 +0000
3+++ poweremail_core.py 2009-12-07 16:15:22 +0000
4@@ -530,9 +530,9 @@
5 #Download Full RF822 Mails
6 for i in range(rec.last_mail_id + 1, int(msg_count[0]) + 1):
7 typ, msg = serv.fetch(str(i), '(FLAGS RFC822)')
8- for id in range(0,len(msg)/2):
9- mails = msg[id*2]
10- flags = msg[(id*2)+1]
11+ for j in range(0,len(msg)/2):
12+ mails = msg[j*2]
13+ flags = msg[(j*2)+1]
14 if type(mails) == type(('tuple', 'type')):
15 if '\Seen' in flags:
16 ctx['state'] = 'read'
17@@ -613,9 +613,9 @@
18 logger.notifyChannel(_("Power Email"), netsvc.LOG_INFO, _("IMAP Folder Statistics for Account:%s:%s") % (id, serv.status(rec.isfolder, '(MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)')[1][0]))
19 #If there are newer mails than the ones in mailbox
20 typ, msg = serv.fetch(str(server_ref), '(FLAGS RFC822)')
21- for id in range(0,len(msg)/2):
22- mails = msg[id*2]
23- flags = msg[(id*2)+1]
24+ for i in range(0,len(msg)/2):
25+ mails = msg[i*2]
26+ flags = msg[(i*2)+1]
27 if type(mails) == type(('tuple', 'type')):
28 if '\Seen' in flags:
29 ctx['state'] = 'read'