def validate_integer(value):
    try:
        int(value)
    except (__HOLE__, TypeError):
        raise ValidationError(_('Enter a valid integer.'), code='invalid')
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/core/validators.py/validate_integer