Dan Kenigsberg has posted comments on this change.
Change subject: utils: Faster version of list2cmdline ......................................................................
Patch Set 1:
(2 comments)
http://gerrit.ovirt.org/#/c/27548/1/lib/vdsm/utils.py File lib/vdsm/utils.py:
Line 656: parts = [] Line 657: for arg in seq: Line 658: if "'" in arg: Line 659: arg = arg.replace("'", "'") Line 660: if ' ' in arg: doublequotes is intentionaly ignored? If so, pls mention in docstring Line 661: arg = "'" + arg + "'" Line 662: parts.append(arg) Line 663: return ' '.join(parts) Line 664:
Line 699: if not printable: Line 700: printable = command Line 701: Line 702: cmdline = repr(list2cmdline(printable)) Line 703: execCmdLogger.debug("%s (cwd %s)", cmdline, cwd) Using %r here (and elsewhere) would save a couple of cycles if non-debug log level is set. (Another patch?) Line 704: Line 705: p = CPopen(command, close_fds=True, cwd=cwd, env=env, Line 706: deathSignal=deathSignal, childUmask=childUmask) Line 707: p = AsyncProc(p)