mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
moved the ignore patterns to an existing for loop to avoid redundancy
This commit is contained in:
parent
eb7c33004f
commit
87e16e5423
1 changed files with 4 additions and 4 deletions
|
|
@ -160,12 +160,12 @@ class Generator:
|
|||
root, topdown=True, followlinks=True):
|
||||
excl = exclusions_by_dirpath.get(dirpath, ())
|
||||
# We copy the `dirs` list as we will modify it in the loop:
|
||||
# ----
|
||||
|
||||
if any(fnmatch.fnmatch(dir, willignore) for willignore in subignores):
|
||||
dirs.remove(dir)
|
||||
# ----
|
||||
for d in list(dirs):
|
||||
# ----
|
||||
if any( fnmatch.fnmatch(d, willignore) for willignore in subignores):
|
||||
dirs.remove(d)
|
||||
# ----
|
||||
if (d in excl or
|
||||
any(fnmatch.fnmatch(d, ignore)
|
||||
for ignore in ignores)):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue