Wrap sys.excepthook only once
Wrap sys.excepthook only once

Check first to see if `sys.excepthook` was already wrapped with
`BdbQuit_excepthook` before doing so.

Without the check that can be made twice and produce a cycle:
    BdbQuit_excepthook.excepthook_ori == BdbQuit_excepthook

Then in `ipython/IPython/core/debugger.py` the code of `BdbQuit_excepthook`
may enter an infinite loop, because it eventually calls
`BdbQuit_excepthook.excepthook_ori`

michelesr/ipdb