Skip to content

Commit

Permalink
Some of the roots can be None in WASM builds
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Nov 18, 2022
1 parent 79b81bb commit 5b27a35
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ def _get_default_library_roots(cls):
if os.path.exists(path) and os.path.basename(path) in ('site-packages', 'pip-global'):
roots.append(path)

# On WASM some of the roots may not exist, filter those out.
roots = [path for path in roots if path is not None]
roots.extend([os.path.realpath(path) for path in roots])

return sorted(set(roots))
Expand Down

0 comments on commit 5b27a35

Please sign in to comment.