Update lib/ansible/utils/collection_loader/_collection_finder.py

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
This commit is contained in:
Jordan Borean 2025-03-07 04:34:13 +10:00
parent c761a71cea
commit ab9cfe9c61
No known key found for this signature in database
GPG key ID: 2AAC89085FBBDAB5

View file

@ -1245,10 +1245,10 @@ def _iter_modules_impl(paths, prefix=''):
if not os.path.isdir(path):
continue
yielded = set()
yielded = {'__init__'}
for basename in sorted(os.listdir(path)):
modname = inspect.getmodulename(basename)
if modname == '__init__' or modname in yielded:
if modname in yielded:
continue
mod_path = os.path.join(path, basename)