Merge pull request #598 from enganese/patch-4

Fixed error in gpt4free/usesless/__init__.py [IndexError: list index out of range]
This commit is contained in:
xtekky 2023-05-24 18:40:12 +01:00 committed by GitHub
commit 86142cddd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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",