

def validate_number(self, number):
    '\n        Validates the given 1-based page number.\n        '
    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

dataset/ETHPy150Open amarandon/smeuhsocial/apps/pagination/paginator.py InfinitePaginator.validate_number/original