Search sys.path_hooks for a finder for 'path'.
(path)
| 1197 | |
| 1198 | @staticmethod |
| 1199 | def _path_hooks(path): |
| 1200 | """Search sys.path_hooks for a finder for 'path'.""" |
| 1201 | if sys.path_hooks is not None and not sys.path_hooks: |
| 1202 | _warnings.warn('sys.path_hooks is empty', ImportWarning) |
| 1203 | for hook in sys.path_hooks: |
| 1204 | try: |
| 1205 | return hook(path) |
| 1206 | except ImportError: |
| 1207 | continue |
| 1208 | else: |
| 1209 | return None |
| 1210 | |
| 1211 | @classmethod |
| 1212 | def _path_importer_cache(cls, path): |
no test coverage detected