def __call__(self, value):
        try:
            super(URLValidator, self).__call__(value)
        except __HOLE__ as e:
            # Trivial case failed. Try for possible IDN domain
            if value:
                value = force_text(value)
                scheme, netloc, path, query, fragment = urlsplit(value)
                try:
                    netloc = netloc.encode('idna').decode('ascii')  # IDN -> ACE
                except UnicodeError:  # invalid domain part
                    raise e
                url = urlunsplit((scheme, netloc, path, query, fragment))
                super(URLValidator, self).__call__(url)
            else:
                raise
        else:
            url = value
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/core/validators.py/URLValidator.__call__