aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetuptools/sandbox.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index 0d6724d1..a06d4483 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -158,14 +158,12 @@ else:
_EXCEPTIONS = []
try:
- import win32com
- _EXCEPTIONS.append(win32com.__gen_path__)
+ from win32com.client.gencache import GetGeneratePath
+ _EXCEPTIONS.append(GetGeneratePath())
+ del GetGeneratePath
except ImportError:
# it appears pywin32 is not installed, so no need to exclude.
pass
-except AttributeError:
- # it appears __gen_path__ is not available, so fail silently
- pass
class DirectorySandbox(AbstractSandbox):
"""Restrict operations to a single subdirectory - pseudo-chroot"""