Skip to content

Commit

Permalink
Protection for wrapped kernels running in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
dsblank committed Sep 11, 2018
1 parent c3c7c86 commit 09e3e24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions metakernel/_metakernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,12 @@ def Error(self, *args, **kwargs):
else:
self.send_response(self.iopub_socket, 'stream', stream_content)

def send_response(self, *args, **kwargs):
### if we are running via %parallel, we might not have a
### session
if self.session:
super().send_response(*args, **kwargs)

def call_magic(self, line):
"""
Given an line, such as "%download http://example.com/", parse
Expand Down

0 comments on commit 09e3e24

Please sign in to comment.