Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(36)

Unified Diff: electronic_mail.py

Issue 3255042: Electronic Mail for Tryton
Patch Set: Changes from last review Created 13 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « __tryton__.py ('k') | electronic_mail.xml » ('j') | electronic_mail.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: electronic_mail.py
===================================================================
--- a/electronic_mail.py
+++ b/electronic_mail.py
@@ -261,6 +261,8 @@
:param mailbox: ID of the mailbox
"""
header_obj = self.pool.get('electronic_mail.header')
+ email_date = mail.get('date') and datetime.fromtimestamp(
+ mktime(parsedate(mail.get('date'))))
ced 2011/03/23 10:42:16 Will it be more readable with an if statement
values = {
'mailbox': mailbox,
'from_': mail.get('from'),
@@ -269,9 +271,7 @@
'cc': mail.get('cc'),
'bcc': mail.get('bcc'),
'subject': mail.get('subject'),
- 'date': mail.get('date') and datetime.fromtimestamp(
- mktime(parsedate(mail.get('date')))
- ) or False,
+ 'date': email_date,
'message_id': mail.get('message-id'),
'in_reply_to': mail.get('in-reply-to'),
'email': mail.as_string(),
« no previous file with comments | « __tryton__.py ('k') | electronic_mail.xml » ('j') | electronic_mail.xml » ('J')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b