From eea4b7cd5dcc7f24a956b253e148b366bc3123fd Mon Sep 17 00:00:00 2001 From: PAN Lei Date: Fri, 9 Dec 2022 11:04:22 +0100 Subject: [PATCH] no need to valid if successful_items if empty --- src/mail/mail_reader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mail/mail_reader.py b/src/mail/mail_reader.py index ab6e1a7..5ff744c 100644 --- a/src/mail/mail_reader.py +++ b/src/mail/mail_reader.py @@ -131,6 +131,8 @@ def clean(text): def need_to_valid_url(url: str, successful_items) -> bool: + if len(successful_items) == 0: + return False print("url is :" + url) parts = url.split('/') id = parts[5]