From 5ef67e6dc9f049149f61ae9a5a038ffce07fa561 Mon Sep 17 00:00:00 2001 From: balki <3070606-balki@users.noreply.gitlab.com> Date: Wed, 19 Dec 2018 02:14:31 -0500 Subject: [PATCH] debug --- mail4one/pop3.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mail4one/pop3.py b/mail4one/pop3.py index 08f0532..60d0a4c 100644 --- a/mail4one/pop3.py +++ b/mail4one/pop3.py @@ -154,7 +154,6 @@ def trans_command_retr(mails, req): write(ok("Contents follow")) write(get_mail(entry)) write(end()) - drain() else: write(err("Not found")) @@ -207,10 +206,14 @@ async def process_transactions(mails_list: List[MailEntry]): async def transaction_stage(deleted_items_path: Path): - with deleted_items_path.open() as f: - deleted_items = set(f.read().splitlines()) + if deleted_items_path.exists(): + with deleted_items_path.open() as f: + deleted_items = set(f.read().splitlines()) + else: + deleted_items = set() mails_list = [entry for entry in get_mails_list(Session.mails_path / 'new') if entry.uid not in deleted_items] + return await process_transactions(mails_list)