diff --git a/.github/scripts/install.sh b/.github/scripts/install.sh index e022a75a894..ab8e95c18c5 100755 --- a/.github/scripts/install.sh +++ b/.github/scripts/install.sh @@ -71,7 +71,8 @@ mamba create -n jedi-test-env -q -y python=3.9 flask spyder-kernels mamba list -n jedi-test-env # Create environment to test conda activation before launching a spyder kernel -mamba create -n spytest-ž -q -y python=3.9 spyder-kernels +mamba create -n spytest-ž -q -y python=3.9 +mamba run -n spytest-ž python -m pip install git+https://github.com/spyder-ide/spyder-kernels.git@master mamba list -n spytest-ž # Install pyenv in Posix systems diff --git a/spyder/plugins/ipythonconsole/widgets/shell.py b/spyder/plugins/ipythonconsole/widgets/shell.py index 0ac33e1ce28..130a933cbdc 100644 --- a/spyder/plugins/ipythonconsole/widgets/shell.py +++ b/spyder/plugins/ipythonconsole/widgets/shell.py @@ -282,7 +282,8 @@ def shutdown(self, shutdown_kernel=True): if self.shutting_down: return self.shutting_down = True - self.kernel_handler.close(shutdown_kernel) + if self.kernel_handler is not None: + self.kernel_handler.close(shutdown_kernel) super().shutdown() def reset_kernel_state(self):