Replace all lines matching `old_line` with `new_line`.

        If ``once`` is set to True, remove only the first instance.

def update(self, old_line, new_line, once=False):
        """Replace all lines matching `old_line` with `new_line`.

        If ``once`` is set to True, remove only the first instance.
        """
        nb = 0
        for i, line in enumerate(self.lines):
            if line.match(old_line):
                self.lines[i] = new_line
                nb += 1
                if once:
                    return nb
        return nb