Change in vdsm[master]: lib: executor: report worker status in __repr__
nsoffer at redhat.com
nsoffer at redhat.com
Mon Dec 14 17:13:57 UTC 2015
Nir Soffer has posted comments on this change.
Change subject: lib: executor: report worker status in __repr__
......................................................................
Patch Set 5:
(1 comment)
https://gerrit.ovirt.org/#/c/49722/5/lib/vdsm/executor.py
File lib/vdsm/executor.py:
Line 218: def __repr__(self):
Line 219: status = (
Line 220: "waiting" if self._callable is None else
Line 221: "running %s" % self._callable
Line 222: )
Good old if is much better in this case:
if self._callable:
status = "running %s" % self._callable
else:
status = "waiting"
If it does not fit in one line ternary operation is useless.
Line 223: return "<Worker name=%s %s%s at 0x%x>" % (
Line 224: self.name,
Line 225: status,
Line 226: " discarded" if self._discarded else "",
--
To view, visit https://gerrit.ovirt.org/49722
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I558787e006d8c9cbbbff6b3dfbd744311ab31e42
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani 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: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list