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: ...@@ -158,14 +158,13 @@ else:
_EXCEPTIONS = [] _EXCEPTIONS = []
try: try:
win32com_pkg = os.path.dirname(__import__('win32com').__file__) import win32com
gen_py_pkg = os.path.join(win32com_pkg, 'gen_py') _EXCEPTIONS.append(win32com.__gen_path__)
_EXCEPTIONS.append(gen_py_pkg)
except ImportError: except ImportError:
# it appears pywin32 is not installed, so no need to exclude. # it appears pywin32 is not installed, so no need to exclude.
pass pass
except AttributeError: except AttributeError:
# unexpected error getting __file__ from win32com # it appears __gen_path__ is not available, so fail silently
pass pass
class DirectorySandbox(AbstractSandbox): 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