Skip to content

Commit

Permalink
Bugfix for email
Browse files Browse the repository at this point in the history
  • Loading branch information
rantahar committed Feb 8, 2024
1 parent 8128836 commit e83b307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions niimpy/reading/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def messages(self):
lines = [line]

lines.append(line)

# Handle last message
if lines:
if isinstance(lines[0], bytes):
message = email.message_from_bytes(b''.join(lines))
else:
message = email.message_from_bytes(b''.join(lines))
message = email.message_from_string(b''.join(lines))
yield(message)

def close(self):
Expand Down

0 comments on commit e83b307

Please sign in to comment.