mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
SF bug #131560: pdb imports 'repr', causing name collision
This commit is contained in:
parent
8af6b83e61
commit
6f8ee59653
1 changed files with 2 additions and 2 deletions
|
|
@ -8,7 +8,7 @@ import sys
|
||||||
import linecache
|
import linecache
|
||||||
import cmd
|
import cmd
|
||||||
import bdb
|
import bdb
|
||||||
import repr
|
from repr import repr as _saferepr
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
|
@ -124,7 +124,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
||||||
if type(exc_type) == type(''):
|
if type(exc_type) == type(''):
|
||||||
exc_type_name = exc_type
|
exc_type_name = exc_type
|
||||||
else: exc_type_name = exc_type.__name__
|
else: exc_type_name = exc_type.__name__
|
||||||
print exc_type_name + ':', repr.repr(exc_value)
|
print exc_type_name + ':', _saferepr(exc_value)
|
||||||
self.interaction(frame, exc_traceback)
|
self.interaction(frame, exc_traceback)
|
||||||
|
|
||||||
# General interaction function
|
# General interaction function
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue