Alon Bar-Lev has posted comments on this change. Change subject: packaging: setup: enhance line uninstall ......................................................................
Patch Set 6: (4 comments) Great, I think we are almost there. .................................................... File packaging/setup/plugins/ovirt-engine-remove/files/simple.py Line 88: #should be updated or added Line 89: if line in replace: Line 90: line = replace[line] Line 91: new_content.append(line) Line 92: new_content.extend(just_add) we should be aware that we modify order... right? Line 93: Line 94: self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( Line 95: filetransaction.FileTransaction( Line 96: name=filename, Line 218: comps = name.split('.') Line 219: if comps[0] == 'line': Line 220: Line 221: index = comps[1] Line 222: # e.g. '00001', '00002', etc usually comments are above statement :) Line 223: Line 224: line_type = comps[2] Line 225: # currently 'name' or 'content' Line 226: Line 234: action = comps[3] Line 235: # currently 'added' or 'removed' Line 236: Line 237: associated_lines.setdefault(index, {}) Line 238: if len(comps) == 3: yes, you are right... better check if this is name or content. Line 239: associated_lines[index][line_type] = value Line 240: else: Line 241: associated_lines[index].setdefault(line_type, {}) Line 242: associated_lines[index][line_type][action] = value Line 237: associated_lines.setdefault(index, {}) Line 238: if len(comps) == 3: Line 239: associated_lines[index][line_type] = value Line 240: else: Line 241: associated_lines[index].setdefault(line_type, {}) can it be: associated_lines[index].setdefault(line_type, {})[action] = value ? Line 242: associated_lines[index][line_type][action] = value Line 243: Line 244: for f in associated_lines.values(): Line 245: aggregated_lines.setdefault( -- To view, visit http://gerrit.ovirt.org/16768 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69ab434de8fb675c67ac5d1907879e465e587dbf Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Alex Lourie <alou...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches