mirror of https://github.com/MISP/mail_to_misp
fix: fail on buggy utf-8
parent
27d4f4555b
commit
4c159f17de
|
@ -353,7 +353,7 @@ if __name__ == '__main__':
|
|||
sys.exit(-1)
|
||||
|
||||
if args.infile:
|
||||
pseudofile = BytesIO(args.infile.read().encode())
|
||||
pseudofile = BytesIO(args.infile.read().encode('utf8', 'surrogateescape'))
|
||||
elif args.read:
|
||||
# read from tempfile
|
||||
with open(args.read, 'rb') as f:
|
||||
|
|
Loading…
Reference in New Issue