mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Bugfix: sleep() imports in community/util
This commit is contained in:
parent
910ba06620
commit
92cda776fa
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
from datetime import datetime, timedelta
|
||||
from threading import Thread
|
||||
from time import sleep
|
||||
from random import randint
|
||||
from typing import List
|
||||
import requests
|
||||
from PIL import Image, ImageOps
|
||||
|
@ -44,7 +45,7 @@ def search_for_community(address: str):
|
|||
webfinger_data = get_request(f"https://{server}/.well-known/webfinger",
|
||||
params={'resource': f"acct:{address[1:]}"})
|
||||
except requests.exceptions.ReadTimeout:
|
||||
time.sleep(randint(3, 10))
|
||||
sleep(randint(3, 10))
|
||||
try:
|
||||
webfinger_data = get_request(f"https://{server}/.well-known/webfinger",
|
||||
params={'resource': f"acct:{address[1:]}"})
|
||||
|
|
Loading…
Add table
Reference in a new issue