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 <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: [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

Reply via email to