diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2010-05-15 11:23:22 -1000 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2010-05-15 11:23:22 -1000 |
commit | 1569d2e22e7e7aa897eaa3ff1c9f2d7a2d5f581a (patch) | |
tree | 4c6aefbc1046ca2c7f37bb05775a37507ebbb917 /setuptools/sandbox.py | |
parent | 50900e7b3129467091d7fb03a716755fcf0b0c52 (diff) | |
download | external_python_setuptools-1569d2e22e7e7aa897eaa3ff1c9f2d7a2d5f581a.tar.gz external_python_setuptools-1569d2e22e7e7aa897eaa3ff1c9f2d7a2d5f581a.tar.bz2 external_python_setuptools-1569d2e22e7e7aa897eaa3ff1c9f2d7a2d5f581a.zip |
Found a public API method which is preferable to using the private attribute for ascertaining the location of the gen_py cache
--HG--
branch : distribute
extra : rebase_source : 6feed4430505ad2d2680b141d41dccb95d9e80af
Diffstat (limited to 'setuptools/sandbox.py')
-rwxr-xr-x | setuptools/sandbox.py | 8 |
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""" |