mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 21:01:27 -07:00
minor change to not search in non-existing paths
This commit is contained in:
parent
adc0e8be97
commit
730c2ba403
1 changed files with 13 additions and 12 deletions
|
@ -175,6 +175,7 @@ class PluginLoader(object):
|
||||||
|
|
||||||
found = None
|
found = None
|
||||||
for path in [p for p in self._get_paths() if p not in self._searched_paths]:
|
for path in [p for p in self._get_paths() if p not in self._searched_paths]:
|
||||||
|
if os.path.isdir(path):
|
||||||
for potential_file in os.listdir(path):
|
for potential_file in os.listdir(path):
|
||||||
for suffix in suffixes:
|
for suffix in suffixes:
|
||||||
if potential_file.endswith(suffix):
|
if potential_file.endswith(suffix):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue