diff options
author | Ned Deily <nad@python.org> | 2018-03-28 05:57:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 05:57:13 (GMT) |
commit | e52ac045972a4f75d7f52e4ee0d6de128259134d (patch) | |
tree | 7751f39de6289036a223a3f7f67f275d6a4d1057 /Lib/test/libregrtest | |
parent | 65a34709f60711f7c46031d4c6c420f567bc790a (diff) | |
download | cpython-e52ac045972a4f75d7f52e4ee0d6de128259134d.zip cpython-e52ac045972a4f75d7f52e4ee0d6de128259134d.tar.gz cpython-e52ac045972a4f75d7f52e4ee0d6de128259134d.tar.bz2 |
bpo-32872: Avoid regrtest compatibility issue with namespace packages. (GH-6276)
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r-- | Lib/test/libregrtest/setup.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/libregrtest/setup.py b/Lib/test/libregrtest/setup.py index bf899a9..910aca1 100644 --- a/Lib/test/libregrtest/setup.py +++ b/Lib/test/libregrtest/setup.py @@ -57,7 +57,7 @@ def setup_tests(ns): if hasattr(module, '__path__'): for index, path in enumerate(module.__path__): module.__path__[index] = os.path.abspath(path) - if hasattr(module, '__file__'): + if getattr(module, '__file__', None): module.__file__ = os.path.abspath(module.__file__) # MacOSX (a.k.a. Darwin) has a default stack size that is too small |