running sys.exit on an engine results in an error trying to handle SystemExit

Bug #400600 reported by Vishal Vatsa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
IPython
Fix Committed
Medium
Brian Granger

Bug Description

To replicate, start an cluster and do:

from IPython.kernel import client
tc = client.get_task_client()
code = "import sys; sys.exit(0)"
task = client.StringTask(code)
id = tc.run(task)
r = tc.get_task_result(id)
r.failure.getTraceback()
"Traceback (most recent call last):\nFailure: exceptions.AttributeError: 'Interpreter' object has no attribute 'resetbuffer'\n"

I know, should not be doing sys.exit, but if you do this error is really hard to diagnose the actual problem.
Would the attached patch more sense?

Since the Interpreter obj. indeed does not have a resetbuffer() method.

Revision history for this message
Vishal Vatsa (vvatsa) wrote :
Changed in ipython:
status: New → Incomplete
importance: Low → Medium
milestone: none → 0.11
Revision history for this message
Fernando Perez (fdo.perez) wrote :

Brian, I'm changing this one to 'in progress' because there seems to be work on it already, including Vihal's patch. If by any chance you've already merged it, just set it to 'fix committed'.

I'm doing this because I want to leave behind on LP all bugs that are incomplete, invalid, or fix committed/released, so we start on GH only with active bugs. So if I leave this one as 'incomplete', it would get left behind with other ones that are marked incomplete because they are simply missing enough information to even know if they are real bugs.

Changed in ipython:
status: Incomplete → In Progress
Changed in ipython:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.