Fixed up unnecessary decode
This commit is contained in:
6
smart.py
6
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()
|
||||
fp.close()
|
||||
|
||||
Reference in New Issue
Block a user