We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0977cb4 commit 5b93e2dCopy full SHA for 5b93e2d
nbclient/client.py
@@ -354,7 +354,7 @@ async def _async_cleanup_kernel(self) -> None:
354
finally:
355
# Remove any state left over even if we failed to stop the kernel
356
await ensure_async(self.km.cleanup())
357
- if self.kc is not None:
+ if getattr(self, "kc") and self.kc is not None:
358
await ensure_async(self.kc.stop_channels())
359
self.kc = None
360
0 commit comments