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 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 connectors import *
|
||||||
from models import AnimeFolder, AnimeTitle, DeleteForm, SearchForm, EditForm
|
from models import AnimeFolder, AnimeTitle, DeleteForm, SearchForm, EditForm
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ from sys import platform
|
|||||||
import requests
|
import requests
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
|
|
||||||
|
from config import IS_DEBUG
|
||||||
from models import AnimeLink
|
from models import AnimeLink
|
||||||
|
|
||||||
|
|
||||||
@ -137,7 +138,8 @@ class Connector(ABC):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
output = ''
|
output = ''
|
||||||
http_code = 500
|
http_code = 500
|
||||||
print(e)
|
if IS_DEBUG:
|
||||||
|
print(e)
|
||||||
else:
|
else:
|
||||||
if ajax:
|
if ajax:
|
||||||
headers = {'X-Requested-With': 'XMLHttpRequest'}
|
headers = {'X-Requested-With': 'XMLHttpRequest'}
|
||||||
|
Reference in New Issue
Block a user