Skip to content

Commit 0d8c01f

Browse files
committed
Check for self.location is not None in Distribution.activate
1 parent 72cac69 commit 0d8c01f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg_resources/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2826,7 +2826,7 @@ def activate(self, path=None, replace=False):
28262826
if path is None:
28272827
path = sys.path
28282828
self.insert_on(path, replace=replace)
2829-
if path is sys.path:
2829+
if path is sys.path and self.location is not None:
28302830
fixup_namespace_packages(self.location)
28312831
for pkg in self._get_metadata('namespace_packages.txt'):
28322832
if pkg in sys.modules:

0 commit comments

Comments
 (0)