From fe94c16ebedde0863a9f4751831d2632239015a3 Mon Sep 17 00:00:00 2001 From: Sylvain Corlay Date: Tue, 21 Aug 2018 12:45:52 -0400 Subject: [PATCH] No need to check for the channels already running --- nbconvert/preprocessors/execute.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nbconvert/preprocessors/execute.py b/nbconvert/preprocessors/execute.py index 0cb1b2b81..2308ba664 100644 --- a/nbconvert/preprocessors/execute.py +++ b/nbconvert/preprocessors/execute.py @@ -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