]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Handle EmptyPage exceptions
authorDaniel Axtens <dja@axtens.net>
Mon, 28 Aug 2017 04:11:27 +0000 (14:11 +1000)
committerStephen Finucane <stephen@that.guru>
Mon, 28 Aug 2017 08:13:38 +0000 (09:13 +0100)
commit7ac9ed5f2e64cf14bee8749d4994e8140885a797
tree56d488c5b33620d50422d06adbc57a6136c886ae
parentfb7321bb36616d194313ab9d3151e508efb9b2a4
Handle EmptyPage exceptions

If a user asks for a page beyond the range of pages, an EmptyPage
exception is thrown. Catch this and clamp the page number
appropriately.

Reported-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Tested-by: Jeremy Kerr <jk@ozlabs.org>
Reviewed-by: Stephen Finucane <stephen@that.guru>
(cherry picked from commit 0901378a0aa32fbd9c0e6a937219199dab759ce0)
patchwork/paginator.py