Change in vdsm[master]: utils: Faster version of list2cmdline

nsoffer at redhat.com nsoffer at redhat.com
Wed May 14 22:24:27 UTC 2014


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)


-- 
To view, visit http://gerrit.ovirt.org/27548
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibfc7819c126fe51cc068cc6f9f85b1002878385b
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list