Skip to content

Commit

Permalink
Fix #245
Browse files Browse the repository at this point in the history
  • Loading branch information
yatintaluja committed Jan 16, 2019
1 parent 5330620 commit 6c4b468
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion camelot/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ def __init__(self, filepath, pages='1', password=None):
self.filepath = filepath
if not filepath.lower().endswith('.pdf'):
raise NotImplementedError("File format not supported")
self.pages = self._get_pages(self.filepath, pages)

if password is None:
self.password = ''
else:
self.password = password
if sys.version_info[0] < 3:
self.password = self.password.encode('ascii')
self.pages = self._get_pages(self.filepath, pages)

def _get_pages(self, filepath, pages):
"""Converts pages string to list of ints.
Expand Down

0 comments on commit 6c4b468

Please sign in to comment.