Nir Soffer has posted comments on this change.
Change subject: utils: Faster version of list2cmdline ......................................................................
Patch Set 4:
(3 comments)
http://gerrit.ovirt.org/#/c/27548/4/lib/vdsm/utils.py File lib/vdsm/utils.py:
Line 644: self._poller.close() Line 645: Line 646: Line 647: # ASCII alphanumeric characters and some other safe characters do not need Line 648: # quoting. Anything else will be quoted in _list2cmdline.
pipes.quote has
Nice, I'll update the list. Line 649: _unsafe = re.compile(r'[^a-zA-Z0-9_-=/:,]').search Line 650: Line 651: Line 652: def _list2cmdline(args):
Line 645: Line 646: Line 647: # ASCII alphanumeric characters and some other safe characters do not need Line 648: # quoting. Anything else will be quoted in _list2cmdline. Line 649: _unsafe = re.compile(r'[^a-zA-Z0-9_-=/:,]').search
utils is growing big; please use a more specific function name (_requires_q
Good idea. Line 650: Line 651: Line 652: def _list2cmdline(args): Line 653: """
Line 703: Line 704: if not printable: Line 705: printable = command Line 706: Line 707: cmdline = repr(_list2cmdline(printable)) Will replace repr with %r in a separate patch Line 708: execCmdLogger.debug("%s (cwd %s)", cmdline, cwd) Line 709: Line 710: p = CPopen(command, close_fds=True, cwd=cwd, env=env, Line 711: deathSignal=deathSignal, childUmask=childUmask)