Change in vdsm[master]: Introducing context manager to terminate async processes on ...
nsoffer at redhat.com
nsoffer at redhat.com
Mon Jan 18 00:42:36 UTC 2016
Nir Soffer has posted comments on this change.
Change subject: Introducing context manager to terminate async processes on internal fail
......................................................................
Patch Set 9:
(1 comment)
Looks good, but poll() can be simplified.
https://gerrit.ovirt.org/#/c/51407/9/lib/vdsm/commands.py
File lib/vdsm/commands.py:
Line 283: return self._returncode
Line 284:
Line 285: def poll(self):
Line 286: self._returncode = self._proc.poll()
Line 287: return self._returncode
This class already implements poll() in returncode(), so we can do:
def poll(self):
return self.returncode
Line 288:
Line 289: def kill(self):
Line 290: try:
Line 291: self._proc.kill()
--
To view, visit https://gerrit.ovirt.org/51407
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I003cce39d62dba5644937fafaf2c6e24c526c075
Gerrit-PatchSet: 9
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