Skip to content

Commit 058b947

Browse files
committed
throw Exception in intialize_jupyter_notebook if file does not exist
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent 597c7e7 commit 058b947

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ipsframework/services.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,11 @@ def initialize_jupyter_notebook(
20042004
if portal_runid < 0:
20052005
return
20062006

2007+
if not os.path.exists(source_notebook_path):
2008+
msg = f'Path to notebook {source_notebook_path} does not exist'
2009+
self.error(msg)
2010+
raise FileNotFoundError(msg)
2011+
20072012
if dest_notebook_name is None:
20082013
dest_notebook_name = os.path.basename(source_notebook_path)
20092014
else:

0 commit comments

Comments
 (0)