1
0
Fork 0
forked from github/pelican

Generator.get_files backwards compatibility for 1 path

This should prevent outdated plugins with generators from failing.
Also fixes #1382.
This commit is contained in:
Ondrej Grover 2014-06-27 20:18:17 +02:00
commit 7fabd712a1

View file

@ -119,6 +119,8 @@ class Generator(object):
:param extensions: the list of allowed extensions (if False, all
extensions are allowed)
"""
if isinstance(paths, six.string_types):
paths = [paths] # backward compatibility for older generators
files = []
for path in paths:
root = os.path.join(self.path, path)