def toint(number):
    if isinstance(number, float):
        number = round(number, 0)
    return int(number)
Helper to return rounded int for a float or just the int it self.
dataset/ETHPy150Open gtaylor/django-athumb/athumb/pial/helpers.py/toint