python3 changes

pull/4/head
Sascha Rommelfangen 2017-05-24 15:50:05 +02:00
parent 09a4c83772
commit 8992f7557c
1 changed files with 15 additions and 14 deletions

View File

@ -44,6 +44,7 @@ if debug:
target.write("New debug session opened")
try:
if not sys.stdin.isatty():
email_subject = b'M2M - '
email_data = b''
mailcontent = "".join(sys.stdin)
@ -62,8 +63,8 @@ except Exception as e:
try:
if not stdin_used:
email_data = str(sys.argv[1])
email_subject = str(sys.argv[2])
email_data = sys.argv[1].encode()
email_subject = sys.argv[2].encode()
except:
if debug:
target.write("FATAL ERROR: Not all required input received")