Change in vdsm[master]: caps: move out parseKeyVal
nsoffer at redhat.com
nsoffer at redhat.com
Thu Mar 3 15:25:11 UTC 2016
Nir Soffer has posted comments on this change.
Change subject: caps: move out parseKeyVal
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/54308/1/lib/vdsm/cmdutils.py
File lib/vdsm/cmdutils.py:
Line 147: result = "SUCCESS" if code == 0 else "FAILED"
Line 148: return "{0}: <err> = {1!r}; <rc> = {2!r}".format(result, err, code)
Line 149:
Line 150:
Line 151: def parse_key_val(lines, delim='='):
How is this related to cmdutils? This module is about building building commands and running them. This looks like generic parser for key=value format.
Maybe move to util?
Line 152: fields = {}
Line 153: for line in lines:
Line 154: try:
Line 155: key, value = [part.strip() for part in line.split(delim, 1)]
--
To view, visit https://gerrit.ovirt.org/54308
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iecce8f7bd6fff0e488370e150b9769e9c9ea1326
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik 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: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list