From cbfbec1b3823090d12937d88a47f619af2854ff1 Mon Sep 17 00:00:00 2001 From: Dongmok Shin Date: Tue, 21 Jul 2020 14:36:53 +0900 Subject: [PATCH] Use http port from config while checking hub On check_hub_ready --- tljh/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tljh/config.py b/tljh/config.py index 85cefd6..e24abce 100644 --- a/tljh/config.py +++ b/tljh/config.py @@ -239,8 +239,10 @@ def remove_config_value(config_path, key_path, value): yaml.dump(config, f) def check_hub_ready(): + from .configurer import load_config + http_port = load_config()['http']['port'] try: - r = requests.get('http://127.0.0.1:80/hub/api', verify=False) + r = requests.get('http://127.0.0.1:%d/hub/api' % http_port, verify=False) return r.status_code == 200 except: return False