From: Skip Montanaro Date: Mon, 7 Jun 2004 02:40:05 +0000 (+0000) Subject: correct name error caught by Neal Norwitz with pychecker X-Git-Tag: v2.4a1~235 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f2134842b463d43312bdbc95b90bd89325d5a7c1;p=thirdparty%2FPython%2Fcpython.git correct name error caught by Neal Norwitz with pychecker --- diff --git a/Lib/pydoc.py b/Lib/pydoc.py index e6b53c19cd42..4d898503623a 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