From 39cf65ffef9c2c8feb57ed5ab95370d454304fcd Mon Sep 17 00:00:00 2001 From: Vinicius Mesel Date: Wed, 24 Oct 2018 15:23:54 -0300 Subject: [PATCH] [MRG + 1] Convert filename to lowercase to check for extension (#169) * Creates a new variable that stores a lowercase version of the filename * Remove variable --- camelot/handlers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camelot/handlers.py b/camelot/handlers.py index d50f313..6820cc7 100644 --- a/camelot/handlers.py +++ b/camelot/handlers.py @@ -26,7 +26,7 @@ class PDFHandler(object): """ def __init__(self, filename, pages='1'): self.filename = filename - if not self.filename.endswith('.pdf'): + if not filename.lower().endswith('.pdf'): raise NotImplementedError("File format not supported") self.pages = self._get_pages(self.filename, pages)