From 5330620ea2381b0697cbe32282b2e9fb3d16bd28 Mon Sep 17 00:00:00 2001 From: yatintaluja Date: Wed, 16 Jan 2019 16:30:05 +0530 Subject: [PATCH 1/2] Bump version --- HISTORY.md | 8 ++++++++ camelot/__version__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 2d674785..2dd00f55 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,14 @@ Release History master ------ +0.7.2 (2019-01-10) +------------------ + + **Bugfixes** + + * [#245](https://github.com/socialcopsdev/camelot/issues/245) Fix AttributeError for encrypted files. [#251](https://github.com/socialcopsdev/camelot/pull/251) by Yatin Taluja. + + 0.7.1 (2019-01-06) ------------------ diff --git a/camelot/__version__.py b/camelot/__version__.py index f4556694..b0fba8f1 100644 --- a/camelot/__version__.py +++ b/camelot/__version__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -VERSION = (0, 7, 1) +VERSION = (0, 7, 2) PRERELEASE = None # alpha, beta or rc REVISION = None From 6c4b46880039b57be5cfb4f00a2cb65698fee495 Mon Sep 17 00:00:00 2001 From: yatintaluja Date: Wed, 16 Jan 2019 16:33:17 +0530 Subject: [PATCH 2/2] Fix #245 --- camelot/handlers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/camelot/handlers.py b/camelot/handlers.py index 4955f038..bd4c031a 100644 --- a/camelot/handlers.py +++ b/camelot/handlers.py @@ -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.