Change in vdsm[master]: qemuimg: Handle new output format

danken at redhat.com danken at redhat.com
Tue Jun 10 20:18:57 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: qemuimg: Handle new output format
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.ovirt.org/#/c/27552/4/lib/vdsm/qemuimg.py
File lib/vdsm/qemuimg.py:

Line 89:         # Scan for optional fields in the output
Line 90:         row = 4
Line 91:         for field, filterFn in (('clustersize', int), ('backingfile', str)):
Line 92:             try:
Line 93:                 info[field] = filterFn(__iregexSearch(field, out[row]))
> How about we just use multi-line regular expressions and search for 'backin
Pardon a possibly dumb question: why don't we iterate output lines and catch the one we need with starts with()? I don't recall if we hand a reason.
Not that I mind long re, but the output seems to have natural line delimitation.
Line 94:                 row = row + 1
Line 95:             except (_RegexSearchError, IndexError):
Line 96:                 pass
Line 97:     except _RegexSearchError:


-- 
To view, visit http://gerrit.ovirt.org/27552
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic229198ab7c2bb9743bdf8629416131186115431
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list