Commit 50900e7b authored by Jason R. Coombs's avatar Jason R. Coombs

Updated gen_py exception to use attribute of win32com rather than infer the location of gen_py

--HG--
branch : distribute
extra : rebase_source : 55f1f3c23dc20edf9c91ea223fc5762fda22f5b2
parent 1fc291ff
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment