Merge pull request #7290 from blueyed/handle_exception-ignore-BdbQuit

Ignore bdb.BdbQuit when handling exceptions
This commit is contained in:
Takeshi KOMIYA 2020-03-21 17:46:26 +09:00 committed by GitHub
commit 8890357c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,11 @@ from sphinx.util.docutils import docutils_namespace, patch_docutils
def handle_exception(app: Sphinx, args: Any, exception: BaseException, stderr: IO = sys.stderr) -> None: # NOQA
import bdb
if isinstance(exception, bdb.BdbQuit):
return
if args.pdb:
import pdb
print(red(__('Exception occurred while building, starting debugger:')),