Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. @classmethod
  2. def _path_hooks(cls, path):
  3. """Search sys.path_hooks for a finder for 'path'."""
  4. if sys.path_hooks is not None and not sys.path_hooks:
  5. _warnings.warn('sys.path_hooks is empty', ImportWarning)
  6. for hook in sys.path_hooks:
  7. try:
  8. return hook(path)
  9. except ImportError:
  10. continue
  11. else:
  12. return None
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement