Skip to content

Commit f42f6b0

Browse files
author
Golf Player
committed
Stop trying to run _async_cleanup_kernel when the kernel_manager and kernel_client don't yet exist.
1 parent 0ab3cc5 commit f42f6b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nbclient/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ async def async_execute(self, **kwargs):
467467
The executed notebook.
468468
"""
469469
reset_kc = kwargs.get('reset_kc', False)
470-
if reset_kc:
470+
if reset_kc and self.km:
471471
await self._async_cleanup_kernel()
472472
self.reset_execution_trackers()
473473

0 commit comments

Comments
 (0)