diff options
-rw-r--r-- | gpt4free/usesless/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gpt4free/usesless/__init__.py b/gpt4free/usesless/__init__.py index 9efc410f..1192192e 100644 --- a/gpt4free/usesless/__init__.py +++ b/gpt4free/usesless/__init__.py @@ -53,7 +53,10 @@ class Account: while True: time.sleep(5) - message_id = mail_client.message_list()[0]["id"] + messages = mail_client.message_list() + if not messages or len(messages) == 0: + continue + message_id = messages[0]["id"] message = mail_client.message(message_id) verification_url = re.findall( r"http:\/\/ai\.usesless\.com\/api\/cms\/auth\/email-confirmation\?confirmation=\w.+\w\w", |