def validate_number(self, number):
        try:
            number = int(number)
        except ValueError:
            raise PageNotAnInteger('That page number is not an integer')
        if number < 1:
            raise EmptyPage('That page number is less than 1')
        return number
Validates the given 1-based page number.
dataset/ETHPy150Open mozilla/kitsune/kitsune/sumo/paginator.py/SimplePaginator.validate_number