Fix 500 for Timeout

This commit is contained in:
Michel Roux 2020-02-24 12:03:46 +01:00
parent df3c72ea92
commit 22a983a522

View File

@ -10,7 +10,7 @@ from urllib.parse import quote
import requests
from bs4 import BeautifulSoup
from requests import ReadTimeout
from requests import Timeout
from config import IS_DEBUG, CACHE_TIMEOUT, BLACKLIST_WORDS
from models import AnimeLink
@ -164,7 +164,7 @@ class Connector(ABC):
output = response.text
http_code = response.status_code
except ReadTimeout as e:
except Timeout as e:
output = ''
http_code = 500
if IS_DEBUG: