summaryrefslogtreecommitdiff
path: root/Lib/pdb.py
diff options
context:
space:
mode:
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 0751c17667..79a36a631d 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):