dispatch/theme/validators.py
def is_valid_uuid(id):
    """Return True if id is a valid UUID, False otherwise."""
    if not isinstance(id, basestring):
        return False

    try:
        val = UUID(id, version=4)
    except ValueError:
        return False

    return True
def is_valid_uuid(id):
    """Return True if id is a valid UUID, False otherwise."""
    if not isinstance(id, basestring):
        return False

    try:
        val = UUID(id, version=4)
    except ValueError:
        return False

    return True
Return True if id is a valid UUID, False otherwise.