Ejemplo n.º 1
0
def convert_anyURI(inpt):
    """Return value of input

    :rtype: url components
    """
    inpt = convert_string(inpt)
    components = urlparse.urlparse(inpt)

    if components[0] and components[1]:
        return components
    else:
        raise InvalidParameterValue(
            'The value "{}" does not seem to be of type anyURI'.format(inpt))
Ejemplo n.º 2
0
def convert_anyURI(inpt):
    """Return value of input
    
    :rtype: url components 
    """
    inpt = convert_string(inpt)
    components = urlparse.urlparse(inpt)

    if components[0] and components[1]:
        return components
    else:
        raise InvalidParameterValue(
            'The value "{}" does not seem to be of type anyURI'.format(inpt))