Fix critical error with pelican --markup argument

If the --markup argument is given, then the following error occurs:
  CRITICAL: endswith first arg must be str, unicode, or tuple, not list

To fix the error, cast the list to a tuple before calling 'endswith'.
This commit is contained in:
Chad Versace 2013-08-03 21:07:46 -07:00
commit ca7d204c11

View file

@ -98,7 +98,7 @@ class Generator(object):
if extensions is None:
extensions = self.markup
basename = os.path.basename(path)
if extensions is False or basename.endswith(extensions):
if extensions is False or basename.endswith(tuple(extensions)):
return True
return False