Change in vdsm[master]: hooks: use the `terminating' decorator
ybronhei at redhat.com
ybronhei at redhat.com
Tue Jan 19 06:47:05 UTC 2016
Yaniv Bronhaim has posted comments on this change.
Change subject: hooks: use the `terminating' decorator
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/52349/2/vdsm_hooks/checkimages/before_vm_start.py
File vdsm_hooks/checkimages/before_vm_start.py:
Line 81: p = hooking.execCmd(cmd, raw=True, sync=False)
Line 82:
Line 83: with terminating(p):
Line 84: if p.wait(timeout) is None:
Line 85: p.kill()
you can avoid calling kill. after exit terminating will kill p
Line 86: sys.stderr.write(
Line 87: 'checkimages: %s image check operation timed out.' % path)
Line 88: sys.stderr.write('Increate timeout or check image availability.')
Line 89: sys.exit(2)
--
To view, visit https://gerrit.ovirt.org/52349
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica692d8b330b71e1fed6fb9df1546ce3a37ade7d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
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