# HG changeset patch # User domruf # Date 2017-08-08 22:43:11 # Node ID f49e1b6cff90c7cefadc24d6eb7aeab1880cd853 # Parent 63f767bcdf98885db714681998118d0c07834ea8 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. diff --git a/kallithea/lib/page.py b/kallithea/lib/page.py --- a/kallithea/lib/page.py +++ b/kallithea/lib/page.py @@ -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 @@ class RepoPage(Page): 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