If the __pycache__ dir is not present, we will get an OSError, which we
are already catching and ignoring. No need to check for that dir.
This commit is contained in:
Erik Johnson 2017-12-19 21:50:03 -06:00
parent 85dbdc6a39
commit 5074741130
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -1210,7 +1210,7 @@ class LazyLoader(salt.utils.lazy.LazyDict):
files = sorted(os.listdir(mod_dir))
except OSError:
continue # Next mod_dir
if six.PY3 and '__pycache__' in files:
if six.PY3:
try:
pycache_files = [
os.path.join('__pycache__', x) for x in