def _expand_minus_str(minus_nodes_str):
    """ Expand a '1-5' or '6' string to a list on integer
    :raises: ValueError on invalid values
    """
    minus_node = minus_nodes_str.split('-')
    res = None
    if len(minus_node) == 1:
        res = [int(minus_node[0])]
    else:
        first, last = minus_node
        nodes_range = range(int(first), int(last) + 1)
        if len(nodes_range) <= 1:
            raise ValueError
        res = nodes_range
    return res
