Skip to content

Commit 62f6f2b

Browse files
fix a small exception handling
1 parent 2328c63 commit 62f6f2b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

email/1.3.0/src/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,11 @@ def merge(d1, d2):
382382
output_dict["imap_id"] = id_list[i]
383383

384384
# Add message-id as top returned field
385-
output_dict["message_id"] = parsed_eml["header"]["header"]["message-id"][0]
385+
try:
386+
output_dict["message_id"] = parsed_eml["header"]["header"]["message-id"][0]
387+
except Exception as _:
388+
output_dict["message_id"] = ""
389+
386390

387391
if upload_email_shuffle:
388392
self.logger.info("Uploading email to shuffle")

0 commit comments

Comments
 (0)