From 55736007fcf5e4ba7a3237f2e6c16e3cbcd629f9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Mar 2020 16:46:08 +0800 Subject: [PATCH] Fixed up unnecessary decode --- smart.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smart.py b/smart.py index b5db4ee..6f27207 100644 --- a/smart.py +++ b/smart.py @@ -5,9 +5,9 @@ import fileinput import os import email -archiveDir = '/var/www/html/reports/' +archiveDir = '/var/www/html/' -rawEmail = sys.stdin.read().decode('utf-8') +rawEmail = sys.stdin.read() emailObject = email.message_from_string(rawEmail) @@ -24,4 +24,4 @@ for part in emailObject.walk(): if not os.path.isfile(filePath): fp = open(filePath, 'wb') fp.write(part.get_payload(decode=True)) - fp.close() \ No newline at end of file + fp.close()