Search sys.path_hooks for a finder for 'path'.
(path)
| 1219 | |
| 1220 | @staticmethod |
| 1221 | def _path_hooks(path): |
| 1222 | """Search sys.path_hooks for a finder for 'path'.""" |
| 1223 | if sys.path_hooks is not None and not sys.path_hooks: |
| 1224 | _warnings.warn('sys.path_hooks is empty', ImportWarning) |
| 1225 | for hook in sys.path_hooks: |
| 1226 | try: |
| 1227 | return hook(path) |
| 1228 | except ImportError: |
| 1229 | continue |
| 1230 | else: |
| 1231 | return None |
| 1232 | |
| 1233 | @classmethod |
| 1234 | def _path_importer_cache(cls, path): |
no test coverage detected