Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

explicit for-loop in cleanup_kernels

makes single-iteration clearer than while loop, as reviewed by @fperez.
  • Loading branch information...
commit 0f2a7ee3f4c1756ca8cee30c428b953fa8ea0fb0 1 parent 14bb294
@minrk minrk authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 IPython/frontend/html/notebook/
5 IPython/frontend/html/notebook/
@@ -367,8 +367,9 @@ def cleanup_kernels(self):
"""'Shutting down kernels')
km = self.kernel_manager
- while km.kernel_ids:
- km.kill_kernel(km.kernel_ids[0])
+ # copy list, since kill_kernel deletes keys
+ for kid in list(km.kernel_ids):
+ km.kill_kernel(kid)
def start(self):
ip = self.ip if self.ip else '[all ip addresses on your system]'

0 comments on commit 0f2a7ee

Please sign in to comment.
Something went wrong with that request. Please try again.