{"comment":{"created_at":"2011-10-15T08:40:44Z","body":"It does handle BdbQuit correctly from *IPython*.  I don't know why it doesn't in regular Python.  The exception handler is set when outside IPython [here](https://github.com/minrk/ipython/blob/e385f97449dac69baa94057889355308c7aa06a5/IPython/core/debugger.py#L111)\r\n","updated_at":"2011-10-15T08:40:44Z","url":"https://api.github.com/repos/ipython/ipython/issues/comments/2414633","id":2414633,"user":{"avatar_url":"https://secure.gravatar.com/avatar/d5b897c37001627c2e3ad3c1e8a7e6fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d5b897c37001627c2e3ad3c1e8a7e6fb","url":"https://api.github.com/users/minrk","id":151929,"login":"minrk"}},"action":"created","issue":{"number":876,"created_at":"2011-10-14T20:58:32Z","pull_request":{"diff_url":"https://github.com/ipython/ipython/pull/876.diff","patch_url":"https://github.com/ipython/ipython/pull/876.patch","html_url":"https://github.com/ipython/ipython/pull/876"},"body":"Previously, errors in custom handlers would result in the custom exception\r\nhandler's error being printed in lieu of the real exception, and certain cases could cause infinite loops.\r\n\r\nNow, if CustomTB fails it is unregistered immediately, and the original TB is also displayed.\r\n\r\nIPython's own `BdbQuit_IPython_excepthook` had an invalid signature, which revealed this issue, and has also been fixed.\r\n\r\ntest included.\r\n\r\ncloses #692","comments":5,"title":"protect IPython from bad custom exception handlers","updated_at":"2011-10-15T08:40:44Z","url":"https://api.github.com/repos/ipython/ipython/issues/876","id":1914094,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/d5b897c37001627c2e3ad3c1e8a7e6fb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"d5b897c37001627c2e3ad3c1e8a7e6fb","url":"https://api.github.com/users/minrk","id":151929,"login":"minrk"},"html_url":"https://github.com/ipython/ipython/issues/876","labels":[],"state":"open"},"legacy":{"issue_id":1914094,"comment_id":2414633}}