summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-30 09:18:49 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-30 09:18:49 (GMT)
commitf833a56fd29e8dd8c926397d91ed88367edce5ca (patch)
tree5ab195c8b84cc86166010f9b936a3cd27bb12896 /Lib/pdb.py
parentc9a5ed04c1c90d0aaf58f6d51d639b4e10f30ad4 (diff)
downloadcpython-f833a56fd29e8dd8c926397d91ed88367edce5ca.zip
cpython-f833a56fd29e8dd8c926397d91ed88367edce5ca.tar.gz
cpython-f833a56fd29e8dd8c926397d91ed88367edce5ca.tar.bz2
#7539: use _saferepr() for printing exceptions from pdb.
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 0751c17..79a36a6 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -237,7 +237,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if type(t) == type(''):
exc_type_name = t
else: exc_type_name = t.__name__
- print >>self.stdout, '***', exc_type_name + ':', v
+ print >>self.stdout, '***', exc_type_name + ':', _saferepr(v)
def precmd(self, line):
"""Handle alias expansion and ';;' separator."""
@@ -753,7 +753,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
if isinstance(t, str):
exc_type_name = t
else: exc_type_name = t.__name__
- print >>self.stdout, '***', exc_type_name + ':', repr(v)
+ print >>self.stdout, '***', exc_type_name + ':', _saferepr(v)
raise
def do_p(self, arg):