Show More
@@ -1089,7 +1089,7 b' class Client(HasTraits):' | |||||
1089 |
|
1089 | |||
1090 | return msg |
|
1090 | return msg | |
1091 |
|
1091 | |||
1092 |
def send_execute_request(self, socket, code, silent= |
|
1092 | def send_execute_request(self, socket, code, silent=True, subheader=None, ident=None): | |
1093 | """construct and send an execute request via a socket. |
|
1093 | """construct and send an execute request via a socket. | |
1094 |
|
1094 | |||
1095 | """ |
|
1095 | """ |
@@ -334,14 +334,8 b' class Kernel(Configurable):' | |||||
334 |
|
334 | |||
335 | reply_content = {} |
|
335 | reply_content = {} | |
336 | try: |
|
336 | try: | |
337 | if silent: |
|
337 | # FIXME: the shell calls the exception handler itself. | |
338 | # run_code uses 'exec' mode, so no displayhook will fire, and it |
|
338 | shell.run_cell(code, store_history=not silent, silent=silent) | |
339 | # doesn't call logging or history manipulations. Print |
|
|||
340 | # statements in that code will obviously still execute. |
|
|||
341 | shell.run_code(code) |
|
|||
342 | else: |
|
|||
343 | # FIXME: the shell calls the exception handler itself. |
|
|||
344 | shell.run_cell(code, store_history=True) |
|
|||
345 | except: |
|
339 | except: | |
346 | status = u'error' |
|
340 | status = u'error' | |
347 | # FIXME: this code right now isn't being used yet by default, |
|
341 | # FIXME: this code right now isn't being used yet by default, | |
@@ -359,7 +353,7 b' class Kernel(Configurable):' | |||||
359 | reply_content[u'status'] = status |
|
353 | reply_content[u'status'] = status | |
360 |
|
354 | |||
361 | # Return the execution counter so clients can display prompts |
|
355 | # Return the execution counter so clients can display prompts | |
362 | reply_content['execution_count'] = shell.execution_count -1 |
|
356 | reply_content['execution_count'] = shell.execution_count - 1 | |
363 |
|
357 | |||
364 | # FIXME - fish exception info out of shell, possibly left there by |
|
358 | # FIXME - fish exception info out of shell, possibly left there by | |
365 | # runlines. We'll need to clean up this logic later. |
|
359 | # runlines. We'll need to clean up this logic later. | |
@@ -404,11 +398,8 b' class Kernel(Configurable):' | |||||
404 | reply_content, parent, ident=ident) |
|
398 | reply_content, parent, ident=ident) | |
405 | self.log.debug("%s", reply_msg) |
|
399 | self.log.debug("%s", reply_msg) | |
406 |
|
400 | |||
407 | if reply_msg['content']['status'] == u'error': |
|
401 | if not silent and reply_msg['content']['status'] == u'error': | |
408 | # FIXME: queue_abort on error is disabled |
|
402 | self._abort_queues() | |
409 | # A policy decision must be made |
|
|||
410 | pass |
|
|||
411 | # self._abort_queues() |
|
|||
412 |
|
403 | |||
413 | self.session.send(self.iopub_stream, |
|
404 | self.session.send(self.iopub_stream, | |
414 | u'status', |
|
405 | u'status', |
General Comments 0
You need to be logged in to leave comments.
Login now