Change in vdsm[master]: util: fix execCmd to accept tuples

nsoffer at redhat.com nsoffer at redhat.com
Sat Mar 29 17:24:45 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: util: fix execCmd to accept tuples
......................................................................


Patch Set 5: Code-Review+1

(2 comments)

Nice

http://gerrit.ovirt.org/#/c/26070/5/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 674:     if sudo:
Line 675:         if os.geteuid() != 0:
Line 676:             command = [constants.EXT_SUDO, SUDO_NON_INTERACTIVE_FLAG] + command
Line 677: 
Line 678:     command = tuple(command)
> I believe that this transformation is no longer required in this version
Your suggestion is not related to this patch - it does support tuples and iteratables now as Dima promised. Removing uneeded tuple conversion later is not required and should not be included.
Line 679:     if not printable:
Line 680:         printable = command
Line 681: 
Line 682:     cmdline = repr(subprocess.list2cmdline(printable))


http://gerrit.ovirt.org/#/c/26070/5/tests/utilsTests.py
File tests/utilsTests.py:

Line 21: import os.path
Line 22: import contextlib
Line 23: import errno
Line 24: import logging
Line 25: import time
This change is not related, but I''l ignore it because the rest is so nice.
Line 26: 
Line 27: from testrunner import VdsmTestCase as TestCaseBase
Line 28: from testValidation import checkSudo
Line 29: from vdsm import utils


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8d1269d9a26b1fef1552976ae626cf4596471283
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets 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