Skip to content

Commit

Permalink
Merge pull request #20238 from ccordoba12/fix-kernel-restart-issues
Browse files Browse the repository at this point in the history
PR: Fix a small kernel restart issue (IPython console)
  • Loading branch information
ccordoba12 authored Dec 22, 2022
2 parents 854aec7 + d0ff9de commit 3244022
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion spyder/plugins/ipythonconsole/widgets/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 3244022

Please sign in to comment.