mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
EAFP
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:
parent
85dbdc6a39
commit
5074741130
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue