Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
#62: Fallback to global path, when there is no local path
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Dec 1, 2020
1 parent c3653b5 commit b46360c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rkd/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ def get_user_site_packages() -> str:
:return:
"""

return next(p for p in sys.path if 'site-packages' in p)
try:
return next(p for p in sys.path if 'site-packages' in p)
except StopIteration:
return _get_global_site_packages()


def _find(path: str, method: Callable) -> Optional[str]:
Expand Down

0 comments on commit b46360c

Please sign in to comment.