Change in vdsm[master]: ensure proc terminatation after poll

nsoffer at redhat.com nsoffer at redhat.com
Sun Mar 27 16:04:23 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: ensure proc terminatation after poll
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/52670/1/lib/vdsm/commands.py
File lib/vdsm/commands.py:

Line 83:                     six.reraise(*exc_info)
Line 84:         return p
Line 85: 
Line 86:     with terminating(p):
Line 87:         (out, err) = p.communicate(data)
The process is terminated at this point, so this should be:

    with terminating(p):
        out, err = p.communicate(data)

    rest of code...
Line 88: 
Line 89:         if out is None:
Line 90:             # Prevent splitlines() from barfing later on
Line 91:             out = ""


Line 95:         if not raw:
Line 96:             out = out.splitlines(False)
Line 97:             err = err.splitlines(False)
Line 98: 
Line 99:         return p.returncode, out, err
> we don't need to test anything here - mocking communicate to raise exceptio
This need a test like any other change. This will be useful when we refactor this code.
Line 100: 
Line 101: 
Line 102: class AsyncProc(object):
Line 103:     """


-- 
To view, visit https://gerrit.ovirt.org/52670
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9bbd07bf33109315f4ea6b9fc2d629163f6696da
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list