Make werkzeug.wsgi middleware imports the fallback option
This change swaps the attempted import order around so that the newer imports are tried first.
This commit is contained in:
parent
cb60540946
commit
e1e54174ec
|
@ -25,9 +25,9 @@ def configure_static_arguments(parser):
|
|||
def configure_static_serving(app, args):
|
||||
if args.static and app.static_folder:
|
||||
try:
|
||||
from werkzeug.wsgi import SharedDataMiddleware
|
||||
except ImportError:
|
||||
from werkzeug.middleware.shared_data import SharedDataMiddleware
|
||||
except ImportError:
|
||||
from werkzeug.wsgi import SharedDataMiddleware
|
||||
|
||||
print("Serving static assets from: {}".format(app.static_folder))
|
||||
app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {
|
||||
|
|
|
@ -18,9 +18,9 @@ from werkzeug.local import LocalProxy
|
|||
from werkzeug.routing import UnicodeConverter
|
||||
from werkzeug.urls import url_quote
|
||||
try:
|
||||
from werkzeug.wsgi import DispatcherMiddleware
|
||||
except ImportError:
|
||||
from werkzeug.middleware.dispatcher import DispatcherMiddleware
|
||||
except ImportError:
|
||||
from werkzeug.wsgi import DispatcherMiddleware
|
||||
import binascii
|
||||
import bleach
|
||||
import decimal
|
||||
|
|
Loading…
Reference in New Issue