Fixed up unnecessary decode

This commit is contained in:
root
2020-03-05 16:46:08 +08:00
parent aeffbeac64
commit 55736007fc

View File

@@ -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()
fp.close()