|
31 | 31 | _MATLAB_STARTUP_TIMEOUT = mwi_settings.get_process_startup_timeout()
|
32 | 32 |
|
33 | 33 |
|
34 |
| -def _fetch_jupyter_base_url(parent_pid: str, logger: Logger) -> Optional[str]: |
| 34 | +def _fetch_jupyter_base_url(parent_pid: str, logger: Logger) -> str: |
35 | 35 | """
|
36 | 36 | Fetches information about the running Jupyter server associated with the MATLAB kernel.
|
37 | 37 |
|
@@ -67,12 +67,12 @@ def _fetch_jupyter_base_url(parent_pid: str, logger: Logger) -> Optional[str]:
|
67 | 67 | # Stop iterating over the server list
|
68 | 68 | return nb_server["base_url"]
|
69 | 69 |
|
70 |
| - # log and return None if the server is not found |
| 70 | + # log and return empty string if the server is not found |
71 | 71 | if not found_nb_server:
|
72 | 72 | logger.debug(
|
73 | 73 | "Jupyter server associated with this MATLAB Kernel not found, might a non-jupyter based MATLAB Kernel"
|
74 | 74 | )
|
75 |
| - return None |
| 75 | + return "" |
76 | 76 |
|
77 | 77 |
|
78 | 78 | def _get_parent_pid() -> int:
|
@@ -442,7 +442,7 @@ def display_output(self, out):
|
442 | 442 | self.send_response(self.iopub_socket, msg_type, response)
|
443 | 443 |
|
444 | 444 | async def perform_startup_checks(
|
445 |
| - self, jupyter_base_url: str = None, matlab_proxy_base_url: str = None |
| 445 | + self, jupyter_base_url="", matlab_proxy_base_url="" |
446 | 446 | ):
|
447 | 447 | """
|
448 | 448 | One time checks triggered during the first execution request. Displays
|
@@ -497,7 +497,7 @@ async def perform_startup_checks(
|
497 | 497 | "type": "display_data",
|
498 | 498 | "content": {
|
499 | 499 | "data": {
|
500 |
| - "text/html": f'<iframe src={jupyter_base_url}{matlab_proxy_base_url} width=700 height=600"></iframe>' |
| 500 | + "text/html": f'<iframe src={matlab_proxy_base_url} width=700 height=600"></iframe>' |
501 | 501 | },
|
502 | 502 | "metadata": {},
|
503 | 503 | },
|
|
0 commit comments