Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bugfix: mailparser - ID
Signed-off-by: Armin Wieser <armin.wieser@gmail.com>
  • Loading branch information
awieser committed Mar 28, 2012
1 parent a32556c commit 2aa5420
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions memacs/lib/mailparser.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Time-stamp: <2012-03-13 11:11:29 armin>
# Time-stamp: <2012-03-28 20:12:09 armin>

import time
import logging
Expand Down Expand Up @@ -103,8 +103,8 @@ def parse_message(message, add_body=False):
except TypeError:
logging.error("could not parse dateime from msg %s", dt)

properties.set_id(time_tupel+"_"+msg_id)
properties.add_data_for_hashing(timestamp + "_" + msg_id)

if "Newsgroups" in headers:
ng_list = []
for ng in headers["Newsgroups"].split(","):
Expand Down
6 changes: 3 additions & 3 deletions memacs/lib/tests/mailparser_test.py
Expand Up @@ -31,7 +31,7 @@ def test_parse_mail_without_body(self):
self.assertEqual(notes, "")
p = """ :PROPERTIES:
:TO: Bob Bobby <Bob@bobby.com>
:ID: f2c1165a321d0e0@foo.com
:ID: 8fd560c32d51c455744df7abd26ea545924ba632
:END:"""

self.assertEqual(unicode(properties), p)
Expand Down Expand Up @@ -61,7 +61,7 @@ def test_parse_mail_with_body(self):
"\nkind reagards,\nBob")
p = """ :PROPERTIES:
:TO: Bob Bobby <Bob@bobby.com>
:ID: f2c1165a321d0e0@foo.com
:ID: 8fd560c32d51c455744df7abd26ea545924ba632
:END:"""

self.assertEqual(unicode(properties), p)
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_parse_ng_with_body(self):
self.assertEqual(notes, "i just want to say that i love Memacs\n")
p = """ :PROPERTIES:\n :REPLY-TO: news@ally.com
:NEWSGROUPS: tu-graz.betriebssysteme.linux
:ID: <2011-11-17T21-58-27@ally.com>
:ID: 53e60f934645301478db6c9d5d3df71a043f9851
:END:"""

self.assertEqual(unicode(properties), p)
2 changes: 1 addition & 1 deletion memacs/photos.py
Expand Up @@ -9,7 +9,7 @@
from lib.memacs import Memacs
from lib.orgproperty import OrgProperties
import imghdr # TODO add to requirements
from PIL import Image # TODO add to requirements
from PIL import Image # TODO add to requirements
from PIL.ExifTags import TAGS


Expand Down

0 comments on commit 2aa5420

Please sign in to comment.