[node-patches] Change in ovirt-node[master]: add return value when persist command does not return an err...

fabiand at fedoraproject.org fabiand at fedoraproject.org
Thu May 16 19:19:30 UTC 2013


Fabian Deutsch has posted comments on this change.

Change subject: add return value when persist command does not return an error code on failure
......................................................................


Patch Set 3:

Mike,

I also thought along similar lines, but I'd rather work with exceptions - as this matches python more. Thus:

* move the ovirt_store_config code into a new function (name doesn't really matter).  
* have it return a different (to be created) _exceptions_ based on failure reason, similar to the changes proposed in the bash version
* create a python function (2) translating the exceptions to rc codes
* have the bash function wrapping the new function (ref 2)
* change the python ovirt_store_config to wrap the new function, but translate the exceptions to True/False

By using exceptions we ensure that the python version really utilizes the correct features in python, which shall help us in the future to write more pythonic code.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I458adeddeb17f63c5d003db808044ad6c8e9e097
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Changming Bai <baichm at linux.vnet.ibm.com>
Gerrit-Reviewer: Changming Bai <baichm at linux.vnet.ibm.com>
Gerrit-Reviewer: Eli Qiao <taget at linux.vnet.ibm.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: Joey Boggs <jboggs at redhat.com>
Gerrit-Reviewer: Michael Burns <mburns at redhat.com>
Gerrit-Reviewer: Wenyi Gao <wenyi at linux.vnet.ibm.com>



More information about the node-patches mailing list