Skip to content

Commit 3654534

Browse files
author
Doug Blank
committed
Error on abort; rename run_cell
1 parent 81a1071 commit 3654534

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

jupyter_client/runapp.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ def start(self):
108108
self.log.debug("jupyter run: executing `%s`" % filename)
109109
with open(filename) as fp:
110110
cell = fp.read()
111-
return_code = self.run_cell(cell)
111+
return_code = self.execute_printing_output(cell)
112112
if return_code:
113113
raise Exception("jupyter-run error running '%s'" % filename)
114114

115-
def run_cell(self, cell):
115+
def execute_printing_output(self, cell):
116116
"""
117117
Run a cell on a KernelClient
118118
Any output from the cell will be displayed.
@@ -145,6 +145,8 @@ def run_cell(self, cell):
145145
return_code = 1
146146
else:
147147
sys.stdout.write(content['data'].get('text/plain', ''))
148+
elif msg_type == 'aborted':
149+
return_code = 1
148150
else:
149151
pass
150152
return return_code

0 commit comments

Comments
 (0)