From b953ac295ba3a83f43bfc955a56a7d73a53b239a Mon Sep 17 00:00:00 2001 From: Min RK Date: Tue, 7 Nov 2017 11:36:05 +0100 Subject: [PATCH] check for built css as well in data-files lookup avoids serving incomplete files --- jupyterhub/_data.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jupyterhub/_data.py b/jupyterhub/_data.py index c53d07d7..284005fe 100644 --- a/jupyterhub/_data.py +++ b/jupyterhub/_data.py @@ -13,7 +13,8 @@ def get_data_files(): # walk up, looking for prefix/share/jupyter while path != '/': share_jupyter = join(path, 'share', 'jupyter', 'hub') - if exists(join(share_jupyter, 'static', 'components')): + static = join(share_jupyter, 'static') + if all(exists(join(static, f)) for f in ['components', 'css']): return share_jupyter path, _ = split(path) # didn't find it, give up