summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index bb669a0..e645086 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -84,6 +84,7 @@ import inspect
import tokenize
import traceback
import linecache
+import _colorize
from contextlib import contextmanager
from rlcompleter import Completer
@@ -2347,7 +2348,7 @@ def main():
print("The program exited via sys.exit(). Exit status:", end=' ')
print(e)
except BaseException as e:
- traceback.print_exc()
+ traceback.print_exception(e, colorize=_colorize.can_colorize())
print("Uncaught exception. Entering post mortem debugging")
print("Running 'cont' or 'step' will restart the program")
pdb.interaction(None, e)