diff --git a/vasl_templates/main.py b/vasl_templates/main.py index e0516d3..5566a29 100755 --- a/vasl_templates/main.py +++ b/vasl_templates/main.py @@ -127,10 +127,6 @@ def _do_main( template_pack, default_scenario, remote_debugging, debug ): #pylin MainWindow.showErrorMsg( "Couldn't install the server settings:\n\n{}".format( ex ) ) return 2 - # disable the Flask "do not use in a production environment" warning - import flask.cli - flask.cli.show_server_banner = lambda *args: None - # start the webapp server port = webapp.config[ "FLASK_PORT_NO" ] def webapp_thread(): diff --git a/vasl_templates/webapp/__init__.py b/vasl_templates/webapp/__init__.py index cc4aab0..5a713c6 100644 --- a/vasl_templates/webapp/__init__.py +++ b/vasl_templates/webapp/__init__.py @@ -11,6 +11,7 @@ import logging import logging.config from flask import Flask, request +import flask.cli import yaml from vasl_templates.webapp.config.constants import BASE_DIR @@ -158,6 +159,9 @@ def _on_sigint( signum, stack ): #pylint: disable=unused-argument # --------------------------------------------------------------------- +# disable the Flask startup banner +flask.cli.show_server_banner = lambda *args: None + # initialize Flask app = Flask( __name__ ) if _is_flask_child_process():