forked from github/pelican
Adding missing call to topdown=True in Generator.get_files
This commit is contained in:
parent
643bccc497
commit
e092f7ca75
2 changed files with 6 additions and 7 deletions
|
|
@ -155,16 +155,15 @@ class Generator(object):
|
|||
|
||||
if os.path.isdir(root):
|
||||
for dirpath, dirs, temp_files in os.walk(
|
||||
root, followlinks=True):
|
||||
drop = []
|
||||
root, topdown=True, followlinks=True):
|
||||
excl = exclusions_by_dirpath.get(dirpath, ())
|
||||
for d in dirs:
|
||||
# We copy the `dirs` list as we will modify it in the loop:
|
||||
for d in list(dirs):
|
||||
if (d in excl or
|
||||
any(fnmatch.fnmatch(d, ignore)
|
||||
for ignore in ignores)):
|
||||
drop.append(d)
|
||||
for d in drop:
|
||||
dirs.remove(d)
|
||||
if d in dirs:
|
||||
dirs.remove(d)
|
||||
|
||||
reldir = os.path.relpath(dirpath, self.path)
|
||||
for f in temp_files:
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ class LogCountHandler(BufferingHandler):
|
|||
"""Capturing and counting logged messages."""
|
||||
|
||||
def __init__(self, capacity=1000):
|
||||
logging.handlers.BufferingHandler.__init__(self, capacity)
|
||||
super(LogCountHandler, self).__init__(capacity)
|
||||
|
||||
def count_logs(self, msg=None, level=None):
|
||||
return len([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue