Skip to content

Commit

Permalink
Check for self.location is not None in Distribution.activate
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Apr 21, 2024
1 parent 72cac69 commit 0d8c01f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2826,7 +2826,7 @@ def activate(self, path=None, replace=False):
if path is None:
path = sys.path
self.insert_on(path, replace=replace)
if path is sys.path:
if path is sys.path and self.location is not None:
fixup_namespace_packages(self.location)
for pkg in self._get_metadata('namespace_packages.txt'):
if pkg in sys.modules:
Expand Down

0 comments on commit 0d8c01f

Please sign in to comment.