mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 06:15:43 +00:00
Prevent Flask from printing a startup message
This commit is contained in:
1 parent
e32caeb9d6
commit
5ae127722f
1 file changed
+5
@@ -151,6 +151,11 @@ class SerenaDashboardAPI:
|
||||
"""
|
||||
Runs the dashboard on the given host and port and returns the port number.
|
||||
"""
|
||||
# patch flask.cli.show_server to avoid printing the server info
|
||||
from flask import cli
|
||||
|
||||
cli.show_server_banner = lambda *args, **kwargs: None
|
||||
|
||||
self._app.run(host=host, port=port, debug=False, use_reloader=False, threaded=True)
|
||||
return port
|
||||
|
||||
|
||||
Reference in new issue
Block a user