[MRG + 1] Convert filename to lowercase to check for extension (#169)
* Creates a new variable that stores a lowercase version of the filename * Remove variablepull/2/head
parent
32df09ad1c
commit
39cf65ffef
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue