summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2004-06-07 02:40:05 (GMT)
committerSkip Montanaro <skip@pobox.com>2004-06-07 02:40:05 (GMT)
commitf2134842b463d43312bdbc95b90bd89325d5a7c1 (patch)
tree41bedd30c20ccb37965de5e8dcb429e4189ba9fe /Lib
parent5dae505bbd59641a948c81bea981e7c44d4c2343 (diff)
downloadcpython-f2134842b463d43312bdbc95b90bd89325d5a7c1.zip
cpython-f2134842b463d43312bdbc95b90bd89325d5a7c1.tar.gz
cpython-f2134842b463d43312bdbc95b90bd89325d5a7c1.tar.bz2
correct name error caught by Neal Norwitz with pychecker
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index e6b53c1..4d89850 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -322,11 +322,11 @@ class Doc:
'thread', 'zipimport') or
(file.startswith(basedir) and
not file.startswith(os.path.join(basedir, 'site-packages'))))):
+ htmlfile = "module-%s.html" % object.__name__
if docloc.startswith("http://"):
- docloc = (docloc.rstrip("/") +
- "/module-%s.html" % object.__name__)
+ docloc = "%s/%s" % (docloc.rstrip("/"), htmlfile)
else:
- docloc = os.path.join(docloc, "module-%s.html" % name)
+ docloc = os.path.join(docloc, htmlfile)
else:
docloc = None
return docloc