feat: show warning if threads blueprint is missing
This commit is contained in:
parent
24cdb8f620
commit
c81887024a
1 changed files with 7 additions and 2 deletions
7
web.py
7
web.py
|
@ -2,10 +2,15 @@ from flask import Flask, send_from_directory
|
|||
from flask_caching import Cache
|
||||
import sentry_sdk
|
||||
import json
|
||||
from threads.threads import threads
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
try:
|
||||
from threads.threads import threads
|
||||
app.register_blueprint(threads, url_prefix='/threads')
|
||||
except ImportError:
|
||||
print(' ! threads blueprint missing')
|
||||
|
||||
app.config.from_file("config.json", load=json.load)
|
||||
|
||||
# caching
|
||||
|
|
Loading…
Reference in a new issue