mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 05:53:00 +00:00
Merge pull request #4567 from jabbera/fix-version-check
Use {base_url}/api for checking hub version
This commit is contained in:
@@ -166,7 +166,7 @@ class Server(HasTraits):
|
||||
name=self.__class__.__name__, url=self.url, bind=self.bind_url
|
||||
)
|
||||
|
||||
def wait_up(self, timeout=10, http=False, ssl_context=None):
|
||||
def wait_up(self, timeout=10, http=False, ssl_context=None, extra_path=""):
|
||||
"""Wait for this server to come up"""
|
||||
if http:
|
||||
ssl_context = ssl_context or make_ssl_context(
|
||||
@@ -174,7 +174,9 @@ class Server(HasTraits):
|
||||
)
|
||||
|
||||
return wait_for_http_server(
|
||||
self.url, timeout=timeout, ssl_context=ssl_context
|
||||
url_path_join(self.url, extra_path),
|
||||
timeout=timeout,
|
||||
ssl_context=ssl_context,
|
||||
)
|
||||
else:
|
||||
return wait_for_server(
|
||||
|
@@ -901,7 +901,10 @@ class User:
|
||||
ssl_context = make_ssl_context(key, cert, cafile=ca)
|
||||
try:
|
||||
resp = await server.wait_up(
|
||||
http=True, timeout=spawner.http_timeout, ssl_context=ssl_context
|
||||
http=True,
|
||||
timeout=spawner.http_timeout,
|
||||
ssl_context=ssl_context,
|
||||
extra_path="api",
|
||||
)
|
||||
except Exception as e:
|
||||
if isinstance(e, AnyTimeoutError):
|
||||
|
Reference in New Issue
Block a user