Add try/except block when stubbing flash's show_server_banner, in order to support older versions of flask

This commit is contained in:
Micah Lee 2019-02-24 18:11:13 -08:00
parent 3af05dcc20
commit 436dd3052d
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -22,7 +22,10 @@ from .receive_mode import ReceiveModeWeb, ReceiveModeWSGIMiddleware, ReceiveMode
def stubbed_show_server_banner(env, debug, app_import_path, eager_loading):
pass
flask.cli.show_server_banner = stubbed_show_server_banner
try:
flask.cli.show_server_banner = stubbed_show_server_banner
except:
pass
class Web(object):