(start, config_lines)
return idx
If we can't read a param declaration correctly, let's default to this method to continue parsing
    from the next block
If we can't read a param declaration correctly, let's default to this method to continue parsing
    from the next block
If we can t read a param declaration correctly let s default to this method to continue parsing from the next block
def _get_next_block_in_case_of_failure(start, config_lines):
    """If we can't read a param declaration correctly, let's default to this method to continue parsing
    from the next block"""
    idx = start
    end = len(config_lines)
    initial_indent = get_indent(config_lines[idx])

    # First get rid of blank lines and comments
    while idx < end:
        current_line = config_lines[idx]
        if is_blank(current_line) or current_line.lstrip(' ').startswith('#'):
            idx += 1
            continue
        break

    # Now wait for the first same-level comment to get back on track
    while idx < end:
        current_line = config_lines[idx]
        if is_exactly_indented(current_line, initial_indent) and current_line[initial_indent] == '#':
            break
        idx += 1

    return idx
def _get_next_block_in_case_of_failure ( start , config_lines ) : idx = start end = len ( config_lines ) initial_indent = get_indent ( config_lines [ idx ] ) # First get rid of blank lines and comments while idx < end : current_line = config_lines [ idx ] if is_blank ( current_line ) or current_line . lstrip ( ' ' ) . startswith ( '#' ) : idx += 1 continue break # Now wait for the first same-level comment to get back on track while idx < end : current_line = config_lines [ idx ] if is_exactly_indented ( current_line , initial_indent ) and current_line [ initial_indent ] == '#' : break idx += 1 return idx