From 5ae127722ff393b27b34d85fc7bbaa6756aaefd5 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Sat, 21 Jun 2025 21:46:26 +0200 Subject: [PATCH] Prevent Flask from printing a startup message --- src/serena/dashboard.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/serena/dashboard.py b/src/serena/dashboard.py index 47bbe69b..ee59aba8 100644 --- a/src/serena/dashboard.py +++ b/src/serena/dashboard.py @@ -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