def validate_ipv46_address(value):
    try:
        validate_ipv4_address(value)
    except __HOLE__:
        try:
            validate_ipv6_address(value)
        except ValidationError:
            raise ValidationError(_('Enter a valid IPv4 or IPv6 address.'), code='invalid')
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/core/validators.py/validate_ipv46_address