Dan Kenigsberg has posted comments on this change. Change subject: vdsm-tool: suppoort dependencies between ModuleConfigure ......................................................................
Patch Set 4: (2 comments) argh, my review is so late - but it equally applies to set 7. http://gerrit.ovirt.org/#/c/31423/4/lib/vdsm/tool/configurator.py File lib/vdsm/tool/configurator.py: Line 169: raise InvalidRun("Remove configuration failed") Line 170: Line 171: Line 172: def _add_dependencies(modulesNames): Line 173: try: try-except block should wrap only the code that can actually raise. In this regards, it's only the line requiredNames = _getConfigurers()[next_].getRequires() right? Line 174: queue = deque(modulesNames) Line 175: retNames = set(queue) Line 176: Line 177: while queue: Line 186: sys.stdout.write( Line 187: "error: argument --module: " Line 188: "invalid choice: %s (choose from %s)\n" % (next_, modulesNames) Line 189: ) Line 190: sys.exit(2) > Please note this was made to replace parse args' 'choices' Instead of copying argparse semantics, you could explicitly call parser.error() I find it a bit nicer, despite the need to pass "parser" into this function. After all, you are using its code. Better do it explicitly. And FWIW, I prefer using the vdsm-tool standard bailout over this handling. Line 191: Line 192: return retNames Line 193: Line 194: -- To view, visit http://gerrit.ovirt.org/31423 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibf63ce9aa3ca8edb82091d09b976e8e23896524e Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: mooli tayer <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: mooli tayer <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
