fix #1720 -- don't wait for the daemon eventhread to terminate but count on it to eventually die

This commit is contained in:
holger krekel
2020-07-15 16:53:30 +02:00
parent f461e2a2fd
commit a27b379ce0
3 changed files with 17 additions and 3 deletions

View File

@@ -162,6 +162,10 @@ class DirectImap:
requested = [b'BODY.PEEK[HEADER]', FLAGS]
for uid, data in self.conn.fetch(messages, requested).items():
body_bytes = data[b'BODY[HEADER]']
if not body_bytes:
log("Message", uid, "has empty body")
continue
flags = data[FLAGS]
path = pathlib.Path(str(dir)).joinpath("IMAP", self.logid, imapfolder)
path.mkdir(parents=True, exist_ok=True)