Skip to content

Commit a2f1c50

Browse files
committed
fallback import when using notebook and jupyter_server is unavailable
1 parent 7f09cf9 commit a2f1c50

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ipyparallel/nbextension/handlers.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
import json
55
import os
66

7-
from jupyter_server.utils import url_path_join as ujoin
7+
try:
8+
from jupyter_server.utils import url_path_join as ujoin
9+
except ImportError:
10+
# fallback on legacy Notebook server
11+
from notebook.utils import url_path_join as ujoin
12+
813
from tornado import web
914

1015
from ..cluster import ClusterManager

0 commit comments

Comments
 (0)