[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
pull/2/head
Vinicius Mesel 2018-10-24 15:23:54 -03:00 committed by Vinayak Mehta
parent 32df09ad1c
commit 39cf65ffef
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class PDFHandler(object):
""" """
def __init__(self, filename, pages='1'): def __init__(self, filename, pages='1'):
self.filename = filename self.filename = filename
if not self.filename.endswith('.pdf'): if not filename.lower().endswith('.pdf'):
raise NotImplementedError("File format not supported") raise NotImplementedError("File format not supported")
self.pages = self._get_pages(self.filename, pages) self.pages = self._get_pages(self.filename, pages)