Small cleanup

This commit is contained in:
Sage Vaillancourt 2022-10-02 22:18:55 -04:00
parent 8a051d2394
commit 9b8221ce1e
2 changed files with 1 additions and 3 deletions

2
.gitignore vendored
View File

@ -20,8 +20,6 @@ temp/
.coverage
htmlcov/
*_min*
dist/
build/
*.egg-info/

View File

@ -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)