Skip to content

Commit

Permalink
fixes #19 solve incorrect type handling on python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo committed Aug 25, 2024
1 parent 9303d94 commit 9c88317
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paginate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def __init__(
first = (self.page - 1) * items_per_page
last = first + items_per_page
self.items = list(self.collection[first:last])
except TypeError:
except (KeyError, TypeError) as exc:
raise TypeError(
"Your collection of type {} cannot be handled "
"by paginate.".format(type(self.collection))
Expand Down

0 comments on commit 9c88317

Please sign in to comment.