]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
correct name error caught by Neal Norwitz with pychecker
authorSkip Montanaro <skip@pobox.com>
Mon, 7 Jun 2004 02:40:05 +0000 (02:40 +0000)
committerSkip Montanaro <skip@pobox.com>
Mon, 7 Jun 2004 02:40:05 +0000 (02:40 +0000)
Lib/pydoc.py

index e6b53c19cd421645b40f21e3969cbddf65ff55d0..4d898503623a5ab0af2b2f8f4658a64fb2d27de6 100755 (executable)
@@ -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