@@ -28,7 +28,7 @@ class or function within a module or module in a package. If the
2828
2929Module docs for core modules are assumed to be in
3030
31- http ://docs.python.org/X.Y/library/
31+ https ://docs.python.org/X.Y/library/
3232
3333This can be overridden by setting the PYTHONDOCS environment variable
3434to a different URL or to a local directory containing the Library
@@ -395,14 +395,15 @@ def getdocloc(self, object,
395395
396396 docloc = os .environ .get ("PYTHONDOCS" , self .PYTHONDOCS )
397397
398+ basedir = os .path .normcase (basedir )
398399 if (isinstance (object , type (os )) and
399400 (object .__name__ in ('errno' , 'exceptions' , 'gc' , 'imp' ,
400401 'marshal' , 'posix' , 'signal' , 'sys' ,
401402 '_thread' , 'zipimport' ) or
402403 (file .startswith (basedir ) and
403404 not file .startswith (os .path .join (basedir , 'site-packages' )))) and
404405 object .__name__ not in ('xml.etree' , 'test.pydoc_mod' )):
405- if docloc .startswith ("http://" ):
406+ if docloc .startswith (( "http://" , "https://" ) ):
406407 docloc = "%s/%s" % (docloc .rstrip ("/" ), object .__name__ .lower ())
407408 else :
408409 docloc = os .path .join (docloc , object .__name__ .lower () + ".html" )
0 commit comments