Sandro Bonazzola has posted comments on this change.
Change subject: packaging: Updated parsing of the async tasks
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(1 inline comment)
I prefer patch set 1, using parseRemoteSqlCommand on the first query, accessing
the result as [0]['count'] and leave the second query as it was.
....................................................
File packaging/fedora/setup/engine-upgrade.py
Line 838: errMsg="Can't get async tasks
list",
Line 839: )
Line 840:
Line 841: # We only want to return anything if there are really async tasks
records
Line 842: # Which means we have more than 1 line (headers)
I'm not sure of this. it seems that parseRemoteSqlCommand returns a list of
dictionaries. each element of the list seems a dictionary {column: value}. So
here you should use > 0 and use a more structured output.
Line 843: if runningTasks and len(runningTasks) > 1:
Line 844: return '\n'.join(runningTasks)
Line 845: else:
Line 846: return ''
--
To view, visit http://gerrit.ovirt.org/13131
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b1f24ef5e83cf09c01c3ebbb00375098ddc52c1
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches