[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
This commit is contained in:
committed by
Vinayak Mehta
parent
32df09ad1c
commit
39cf65ffef
+1
-1
@@ -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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user