This commit is contained in:
tonio
2010-04-22 21:36:28 +02:00
parent 1f894c8952
commit 4624eef6eb
8 changed files with 71 additions and 70 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
import time
import re
import os
from email.header import decode_header
import lxml
import lxml.html
@@ -159,7 +160,7 @@ class Email(object):
if re.match("^http:", fname):
path = fname
else:
path = "/%s" % os.path.join("static/tmp", fname)
path = os.path.abspath("static/tmp" + fname)
fp = open(path, "wb")
fp.write(part.get_payload(decode=True))
fp.close()