Mercurial > kallithea
changeset 6922:f49e1b6cff90
logging: log wrong value for page number
This should not happen and "Errors should never pass silently".
If it happens anyway, we should have some record it.
author | domruf <dominikruf@gmail.com> |
---|---|
date | Tue, 08 Aug 2017 22:43:11 +0200 |
parents | 63f767bcdf98 |
children | d2f20f3d2117 |
files | kallithea/lib/page.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/page.py Wed Aug 16 23:21:43 2017 +0200 +++ b/kallithea/lib/page.py Tue Aug 08 22:43:11 2017 +0200 @@ -14,13 +14,15 @@ """ Custom paging classes """ - +import logging import math import re from kallithea.config.routing import url from webhelpers.html import literal, HTML from webhelpers.paginate import Page as _Page +log = logging.getLogger(__name__) + class Page(_Page): """ @@ -188,6 +190,7 @@ try: self.page = int(page) # make it int() if we get it as a string except (ValueError, TypeError): + log.error("Invalid page value: %r" % page) self.page = 1 self.items_per_page = items_per_page