14
0
Files
python-paginate/python312.patch

14 lines
611 B
Diff

Index: paginate-0.5.6/paginate/__init__.py
===================================================================
--- paginate-0.5.6.orig/paginate/__init__.py
+++ paginate-0.5.6/paginate/__init__.py
@@ -250,7 +250,7 @@ class Page(list):
first = (self.page - 1) * items_per_page
last = first + items_per_page
self.items = list(self.collection[first:last])
- except TypeError:
+ except (TypeError, KeyError):
raise TypeError("Your collection of type {} cannot be handled "
"by paginate.".format(type(self.collection)))