summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-21 18:09:23 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-21 18:09:23 (GMT)
commita8e65755c4080b606972c6fadf74ea29bd1cadf8 (patch)
tree24514a8dcb8222539baa5aeb61d55f4c984fad25 /Lib/pydoc.py
parent2c6ca8adb3739abc10e390ff497427758b6ed8c5 (diff)
downloadcpython-a8e65755c4080b606972c6fadf74ea29bd1cadf8.zip
cpython-a8e65755c4080b606972c6fadf74ea29bd1cadf8.tar.gz
cpython-a8e65755c4080b606972c6fadf74ea29bd1cadf8.tar.bz2
Issue #23008: Fixed resolving attributes with boolean value is False in pydoc.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index b56d385..d7396f0 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1540,7 +1540,7 @@ def resolve(thing, forceload=0):
"""Given an object or a path to an object, get the object and its name."""
if isinstance(thing, str):
object = locate(thing, forceload)
- if not object:
+ if object is None:
raise ImportError, 'no Python documentation found for %r' % thing
return object, thing
else: