File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
jupyter_server_proxy/standalone Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,18 @@ class StandaloneProxyServer(JupyterApp, ServerProcess):
45
45
46
46
@default ("base_url" )
47
47
def _default_prefix (self ):
48
- return os .environ .get ("JUPYTERHUB_SERVICE_PREFIX" , "/" ).removesuffix ("/" )
48
+ # Python 3.8 does not support removesuffix
49
+ prefix = os .environ .get ("JUPYTERHUB_SERVICE_PREFIX" , "/" )
50
+ if prefix [- 1 ] == "/" :
51
+ prefix = prefix [:- 1 ]
52
+ return prefix
49
53
50
54
@validate ("base_url" )
51
55
def _validate_prefix (self , proposal ):
52
- return proposal ["value" ].removesuffix ("/" )
56
+ prefix = proposal ["value" ]
57
+ if prefix [- 1 ] == "/" :
58
+ prefix = prefix [:- 1 ]
59
+ return prefix
53
60
54
61
skip_authentication = Bool (
55
62
default = False ,
@@ -277,7 +284,7 @@ def start(self):
277
284
278
285
self .log .info (f"Starting standaloneproxy on '{ self .address } :{ self .port } '" )
279
286
self .log .info (f"Base URL: { self .base_url !r} " )
280
- self .log .info (f"Command: { ' ' . join ( self .command )!r } " )
287
+ self .log .info (f"Command: { self .command } " )
281
288
282
289
# Periodically send JupyterHub Notifications, that we are still running
283
290
if self .activity_interval > 0 :
You can’t perform that action at this time.
0 commit comments