

def cleanupEdit(self, edit):
    if edit.old_key:
        self.deleteComment(edit.old_key)
        edit.old_key = None
    if edit.new_key:
        old.deleteComment(edit.new_key)
        edit.new_key = None
    old = edit.old.edit_text.strip()
    new = edit.new.edit_text.strip()
    if (old or new):
        if old:
            edit.old_key = self.saveComment(edit.context, old, new=False)
        if new:
            edit.new_key = self.saveComment(edit.context, new, new=True)
    else:
        self.listbox.body.remove(edit)

dataset/ETHPy150Open openstack/gertty/gertty/view/side_diff.py SideDiffView.cleanupEdit/VarMisuse@42/51 `self`->`old`