Browse Source

use getattr to guard

Mehmet Bektas 5 years ago
parent
commit
743a7f9e77
1 changed files with 1 additions and 1 deletions
  1. 1 1
      jupyterlab/extension.py

+ 1 - 1
jupyterlab/extension.py

@@ -147,7 +147,7 @@ def load_jupyter_server_extension(nbapp):
 
     # Client-side code assumes notebookVersion is a JSON-encoded string
     page_config['notebookVersion'] = dumps(version_info)
-    page_config['exposeAppInBrowser'] = nbapp.expose_app_in_browser
+    page_config['exposeAppInBrowser'] = getattr(nbapp, 'expose_app_in_browser', False)
 
     if nbapp.file_to_run and type(nbapp).__name__ == "LabApp":
         relpath = os.path.relpath(nbapp.file_to_run, nbapp.notebook_dir)