From 809351ae0021f48b8a138212764aab4396f564ef Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 7 May 2021 13:06:31 +0300 Subject: utility: startup_config: Use python3 f-strings --- wqflask/utility/startup_config.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wqflask/utility/startup_config.py b/wqflask/utility/startup_config.py index d705a0ff..56d0af6f 100644 --- a/wqflask/utility/startup_config.py +++ b/wqflask/utility/startup_config.py @@ -24,16 +24,17 @@ def app_config(): app.config['TEMPLATES_AUTO_RELOAD'] = True print("==========================================") + show_settings() port = get_setting_int("SERVER_PORT") if get_setting_bool("USE_GN_SERVER"): - print( - ("GN2 API server URL is [" + BLUE + get_setting("GN_SERVER_URL") + ENDC + "]")) + print(f"GN2 API server URL is [{BLUE}GN_SERVER_URL{ENDC}]") import requests page = requests.get(get_setting("GN_SERVER_URL")) if page.status_code != 200: raise Exception("API server not found!") - print(("GN2 is running. Visit %s[http://localhost:%s/%s](%s)" % - (BLUE, str(port), ENDC, get_setting("WEBSERVER_URL")))) + print(f"GN2 is running. Visit {BLUE}" + f"[http://localhost:{str(port)}/{ENDC}]" + f"({get_setting('WEBSERVER_URL')})") -- cgit v1.2.3