loader: Avoid loading autosave files (#53856)
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
64943e2f9d
commit
73e171fd94
1 changed files with 1 additions and 1 deletions
|
@ -345,7 +345,7 @@ class PluginLoader:
|
||||||
# HACK: We have no way of executing python byte compiled files as ansible modules so specifically exclude them
|
# HACK: We have no way of executing python byte compiled files as ansible modules so specifically exclude them
|
||||||
# FIXME: I believe this is only correct for modules and module_utils.
|
# FIXME: I believe this is only correct for modules and module_utils.
|
||||||
# For all other plugins we want .pyc and .pyo should be valid
|
# For all other plugins we want .pyc and .pyo should be valid
|
||||||
if full_path.endswith(('.pyc', '.pyo')):
|
if any(full_path.endswith(x) for x in C.BLACKLIST_EXTS):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
splitname = os.path.splitext(full_name)
|
splitname = os.path.splitext(full_name)
|
||||||
|
|
Loading…
Reference in a new issue