Show connector error only on debug mode
This commit is contained in:
parent
fea6339cb8
commit
558e8170da
2
app.py
2
app.py
@ -2,7 +2,7 @@ from operator import itemgetter
|
||||
|
||||
from flask import redirect, render_template, request, url_for
|
||||
|
||||
from config import app, auth, db, ADMIN_USERNAME, ADMIN_PASSWORD, APP_PORT, IS_DEBUG
|
||||
from config import app, auth, db, ADMIN_USERNAME, ADMIN_PASSWORD, APP_PORT
|
||||
from connectors import *
|
||||
from models import AnimeFolder, AnimeTitle, DeleteForm, SearchForm, EditForm
|
||||
|
||||
|
@ -10,6 +10,7 @@ from sys import platform
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
from config import IS_DEBUG
|
||||
from models import AnimeLink
|
||||
|
||||
|
||||
@ -137,7 +138,8 @@ class Connector(ABC):
|
||||
except Exception as e:
|
||||
output = ''
|
||||
http_code = 500
|
||||
print(e)
|
||||
if IS_DEBUG:
|
||||
print(e)
|
||||
else:
|
||||
if ajax:
|
||||
headers = {'X-Requested-With': 'XMLHttpRequest'}
|
||||
|
Reference in New Issue
Block a user