Skip to content

Commit

Permalink
Merge pull request #862 from SylvainCorlay/execute-fixup
Browse files Browse the repository at this point in the history
No need to check for the channels already running
  • Loading branch information
SylvainCorlay authored Aug 21, 2018
2 parents 9f1a2aa + fe94c16 commit c60f7ad
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nbconvert/preprocessors/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,13 @@ def setup_preprocessor(self, nb, resources, km=None):
if not km.has_kernel:
km.start_kernel(extra_arguments=self.extra_arguments, **kwargs)
self.kc = km.client()
if not self.kc.channels_running:
self.kc.start_channels()
try:
self.kc.wait_for_ready(timeout=self.startup_timeout)
except RuntimeError:
self.kc.stop_channels()
raise

self.kc.start_channels()
try:
self.kc.wait_for_ready(timeout=self.startup_timeout)
except RuntimeError:
self.kc.stop_channels()
raise
self.kc.allow_stdin = False
try:
yield nb, self.km, self.kc
Expand Down

0 comments on commit c60f7ad

Please sign in to comment.