Skip to content

Commit 133317a

Browse files
authored
Update time.sleep()
1 parent 0729028 commit 133317a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

vpython/with_notebook.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ def find_free_port():
5858
if jupyterlab.__version__ >= '0.35.0':
5959
from os.path import join
6060
labextensions_dir = join(jupyterlab.commands.get_app_dir(), u'static')
61-
try:
62-
notebook.nbextensions.install_nbextension(path=package_dir + "/vpython_data",
63-
nbextensions_dir=labextensions_dir,
64-
overwrite=False,
65-
verbose=0)
66-
except PermissionError:
67-
#logging.info("PermissionError: Unable to install /vpython_data directory and files for VPython on JupyterLab")
68-
pass
61+
try:
62+
notebook.nbextensions.install_nbextension(path=package_dir + "/vpython_data",
63+
nbextensions_dir=labextensions_dir,
64+
overwrite=False,
65+
verbose=0)
66+
except PermissionError:
67+
#logging.info("PermissionError: Unable to install /vpython_data directory and files for VPython on JupyterLab")
68+
pass
6969

7070

7171
if 'nbextensions' in os.listdir(jd):
@@ -107,9 +107,9 @@ def find_free_port():
107107
display(Javascript("""if (typeof Jupyter !== "undefined") {require(["nbextensions/vpython_libraries/jquery-ui.custom.min"], function(){console.log("JQUERY LOADED");});}else{element.textContent = ' ';}"""))
108108

109109
if transfer:
110-
time.sleep(4) # allow some time for javascript code above to run after nbextensions update before attempting to setup Comm Channel
110+
time.sleep(4) # allow some time for javascript code above to run after nbextensions update before attempting to setup Comm Channel
111111
else:
112-
time.sleep(2) # allow some time for javascript code above to run before attempting to setup Comm Channel
112+
time.sleep(2) # allow some time for javascript code above to run before attempting to setup Comm Channel
113113

114114
wsConnected = False
115115

0 commit comments

Comments
 (0)