Merge pull request #5122 from bzed/broken_symlink_fix

Ignore broken symlinks while resolving strategies.
This commit is contained in:
Matthias 2021-06-14 05:10:56 +01:00 committed by GitHub
commit 1d0a178eb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,6 +91,9 @@ class IResolver:
if not str(entry).endswith('.py'):
logger.debug('Ignoring %s', entry)
continue
if entry.is_symlink() and not entry.is_file():
logger.debug('Ignoring broken symlink %s', entry)
continue
module_path = entry.resolve()
obj = next(cls._get_valid_object(module_path, object_name), None)