Assaf Muller has posted comments on this change.
Change subject: utils: Extend pgrep to accept multiple process names
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.ovirt.org/#/c/23239/1/lib/vdsm/utils.py
File lib/vdsm/utils.py:
Line 264: pid = os.path.basename(path)
Line 265: yield int(pid)
Line 266:
Line 267:
Line 268: def pgrep(*names):
I think it could use a docstring now.
While the change is
completely hidden from current users - I agree, it should be explicitly noted that the
function can accept a single or multiple names.
Line 269: res = []
Line 270: for pid in iteratePids():
Line 271: try:
Line 272: procName = pidStat(pid).comm
--
To view, visit
http://gerrit.ovirt.org/23239
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I891ee6c36b4198ce9900e56a62939b9a7bafbc6e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes