From ca7d204c11fbb00a845186e1d4c084d786c7bbc8 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Sat, 3 Aug 2013 21:07:46 -0700 Subject: [PATCH] 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'. --- pelican/generators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/generators.py b/pelican/generators.py index f2fa0e33..9fc98663 100644 --- a/pelican/generators.py +++ b/pelican/generators.py @@ -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