import sys
from io import StringIO
from config import config
-import util
+import shutil
import log
def recode(s):
self.body.write("\n\n[...]\n\n")
line += 1
else:
- util.sendfile(open(log), self.body)
+ shutil.copyfileobj(open(log), self.body)
def set_std_headers(self):
self.headers["Date"] = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
f.write("%s: %s\n" % (k, v))
f.write("\n")
self.body.seek(0)
- util.sendfile(self.body, f)
+ shutil.copyfileobj(self.body, f)
def send(self):
if not os.path.exists("/usr/lib/sendmail"):