diff --git a/Lib/site.py b/Lib/site.py index 0fc92009e19af3..b59f352588ccb6 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -124,7 +124,7 @@ def removeduppaths(): # if they only differ in case); turn relative paths into absolute # paths. dir, dircase = makepath(dir) - if not dircase in known_paths: + if dircase not in known_paths: L.append(dir) known_paths.add(dircase) sys.path[:] = L @@ -279,9 +279,11 @@ def addusersitepackages(known_paths): """ # get the per user site-package path # this call will also make sure USER_BASE and USER_SITE are set - user_site = getusersitepackages() + if not ENABLE_USER_SITE: + return known_paths - if ENABLE_USER_SITE and os.path.isdir(user_site): + user_site = getusersitepackages() + if os.path.isdir(user_site): addsitedir(user_site, known_paths) return known_paths pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy