summaryrefslogtreecommitdiffstats
path: root/Lib/pdb.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-09-16 16:40:45 (GMT)
committerGeorg Brandl <georg@python.org>2009-09-16 16:40:45 (GMT)
commit9fa2e02fe2c4c01fc725370a1711411bc48e30c4 (patch)
tree981e28ba447036ded6862c1fce723daa29b788ee /Lib/pdb.py
parentee8783d0fcb937fd69a0a448bb80af7c4a438e18 (diff)
downloadcpython-9fa2e02fe2c4c01fc725370a1711411bc48e30c4.zip
cpython-9fa2e02fe2c4c01fc725370a1711411bc48e30c4.tar.gz
cpython-9fa2e02fe2c4c01fc725370a1711411bc48e30c4.tar.bz2
Merged revisions 74838-74839 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74838 | georg.brandl | 2009-09-16 18:22:12 +0200 (Mi, 16 Sep 2009) | 1 line Remove some more boilerplate from the actual tests in test_pdb. ........ r74839 | georg.brandl | 2009-09-16 18:36:39 +0200 (Mi, 16 Sep 2009) | 1 line Make the pdb displayhook compatible with the standard displayhook: do not print Nones. Add a test for that. ........
Diffstat (limited to 'Lib/pdb.py')
-rwxr-xr-xLib/pdb.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 627cd29..22dcff7 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -208,7 +208,9 @@ class Pdb(bdb.Bdb, cmd.Cmd):
"""Custom displayhook for the exec in default(), which prevents
assignment of the _ variable in the builtins.
"""
- print(repr(obj))
+ # reproduce the behavior of the standard displayhook, not printing None
+ if obj is not None:
+ print(repr(obj))
def default(self, line):
if line[:1] == '!': line = line[1:]