Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @classmethod
- def _path_hooks(cls, path):
- """Search sys.path_hooks for a finder for 'path'."""
- if sys.path_hooks is not None and not sys.path_hooks:
- _warnings.warn('sys.path_hooks is empty', ImportWarning)
- for hook in sys.path_hooks:
- try:
- return hook(path)
- except ImportError:
- continue
- else:
- return None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement