From 20229d639238212cf9a7e64305be8ac3f9cc8eaa Mon Sep 17 00:00:00 2001 From: hrdl <31923882+hrdl-github@users.noreply.github.com> Date: Thu, 16 Nov 2023 00:05:08 +0100 Subject: [PATCH] Check for None in case we are dealing with an externally launched kernel Fix #594. --- qtconsole/qtconsoleapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtconsole/qtconsoleapp.py b/qtconsole/qtconsoleapp.py index cee348d6..b93a9077 100644 --- a/qtconsole/qtconsoleapp.py +++ b/qtconsole/qtconsoleapp.py @@ -191,7 +191,7 @@ def new_frontend_master(self): # start the kernel kwargs = {} # FIXME: remove special treatment of IPython kernels - if self.kernel_manager.ipykernel: + if self.kernel_manager and self.kernel_manager.ipykernel: kwargs['extra_arguments'] = self.kernel_argv kernel_manager.start_kernel(**kwargs) kernel_manager.client_factory = self.kernel_client_class