mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't put __pycache__ dir in the file list
This prevents the loader from needlessly trying to process it (which will fail anyway since it's not a file).
This commit is contained in:
parent
e7c10196da
commit
4b95e5f313
1 changed files with 3 additions and 1 deletions
|
@ -1223,7 +1223,9 @@ class LazyLoader(salt.utils.lazy.LazyDict):
|
|||
try:
|
||||
# Make sure we have a sorted listdir in order to have
|
||||
# expectable override results
|
||||
files = sorted(os.listdir(mod_dir))
|
||||
files = sorted(
|
||||
x for x in os.listdir(mod_dir) if x != '__pycache__'
|
||||
)
|
||||
except OSError:
|
||||
continue # Next mod_dir
|
||||
if six.PY3:
|
||||
|
|
Loading…
Add table
Reference in a new issue