Small cleanup
This commit is contained in:
parent
8a051d2394
commit
9b8221ce1e
|
@ -20,8 +20,6 @@ temp/
|
|||
.coverage
|
||||
htmlcov/
|
||||
|
||||
*_min*
|
||||
|
||||
dist/
|
||||
build/
|
||||
*.egg-info/
|
||||
|
|
|
@ -13,6 +13,7 @@ from app import routes, email
|
|||
def create_app(test_config=None) -> Flask:
|
||||
app = Flask(__name__, instance_relative_config=True)
|
||||
Minify(app=app, html=True, js=True, cssless=True)
|
||||
|
||||
secret_key = os.environ.get('UNDERCOVER_SECRET_KEY')
|
||||
if not secret_key:
|
||||
sys.stderr.write("WARNING: UNDERCOVER_SECRET_KEY is not defined! Application may be insecure.\n")
|
||||
|
@ -32,7 +33,6 @@ def create_app(test_config=None) -> Flask:
|
|||
def internal_error(e) -> HTTPException | Response:
|
||||
if isinstance(e, HTTPException):
|
||||
return e
|
||||
print(str(e))
|
||||
email.exception_alert(e)
|
||||
return make_response(render_template('error.jinja2', status=500, error_text='Internal error occurred.', extra_text="We're looking into it!"), 500)
|
||||
|
||||
|
|
Loading…
Reference in New Issue