Saggi Mizrahi has posted comments on this change. Change subject: make misc.pgrep for general usage ......................................................................
Patch Set 3: Code-Review-1 (1 comment) .................................................... File vdsm/storage/misc.py Line 1108: pid = os.path.basename(path) Line 1109: yield int(pid) Line 1110: Line 1111: Line 1112: def pgrep(value, field): I think using the existing method in conjunction with http://docs.python.org/2/library/itertools.html#itertools.ifilter would be a lot simpler to use and would solve more a diverse set of problems. Line 1113: """ Line 1114: grep processes whose given field's value matches specified value Line 1115: see man 5 proc '/proc/[pid]/stat' for fields description Line 1116: """ -- To view, visit http://gerrit.ovirt.org/11033 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2034b04a4787d2f222cb98dfe3ffcdbb2a94ebb8 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Royce Lv <[email protected]> Gerrit-Reviewer: Better Saggi <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Mark Wu <[email protected]> Gerrit-Reviewer: Royce Lv <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Shu Ming <[email protected]> Gerrit-Reviewer: Yaniv Bronhaim <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
