]> 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:12:15 +0000 (09:12 +0100)
commit0901378a0aa32fbd9c0e6a937219199dab759ce0
treebbd93685f40e9e3b4df6d878ac6cb0f8105467db
parent606022a305875f5cceae1f135f3a34b738305fd3
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>
patchwork/paginator.py