aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/sandbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-xsetuptools/sandbox.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/sandbox.py b/setuptools/sandbox.py
index 37fc60af..0d6724d1 100755
--- a/setuptools/sandbox.py
+++ b/setuptools/sandbox.py
@@ -158,14 +158,13 @@ else:
_EXCEPTIONS = []
try:
- win32com_pkg = os.path.dirname(__import__('win32com').__file__)
- gen_py_pkg = os.path.join(win32com_pkg, 'gen_py')
- _EXCEPTIONS.append(gen_py_pkg)
+ import win32com
+ _EXCEPTIONS.append(win32com.__gen_path__)
except ImportError:
# it appears pywin32 is not installed, so no need to exclude.
pass
except AttributeError:
- # unexpected error getting __file__ from win32com
+ # it appears __gen_path__ is not available, so fail silently
pass
class DirectorySandbox(AbstractSandbox):