bpo-34182: Fix test_pydoc running as a script. (GH-8389)
This commit is contained in:
parent
3f8c6913b8
commit
4e11c461ed
|
@ -357,8 +357,9 @@ def get_pydoc_html(module):
|
|||
|
||||
def get_pydoc_link(module):
|
||||
"Returns a documentation web link of a module"
|
||||
abspath = os.path.abspath
|
||||
dirname = os.path.dirname
|
||||
basedir = dirname(dirname(__file__))
|
||||
basedir = dirname(dirname(abspath(__file__)))
|
||||
doc = pydoc.TextDoc()
|
||||
loc = doc.getdocloc(module, basedir=basedir)
|
||||
return loc
|
||||
|
|
Loading…
Reference in New Issue