mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Use http port from config while checking hub
On check_hub_ready
This commit is contained in:
committed by
GeorgianaElena
parent
66c07e0d25
commit
cbfbec1b38
@@ -239,8 +239,10 @@ def remove_config_value(config_path, key_path, value):
|
|||||||
yaml.dump(config, f)
|
yaml.dump(config, f)
|
||||||
|
|
||||||
def check_hub_ready():
|
def check_hub_ready():
|
||||||
|
from .configurer import load_config
|
||||||
|
http_port = load_config()['http']['port']
|
||||||
try:
|
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
|
return r.status_code == 200
|
||||||
except:
|
except:
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user