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

wenyi at linux.vnet.ibm.com wenyi at linux.vnet.ibm.com
Fri May 24 06:21:16 UTC 2013


Wenyi Gao has posted comments on this change.

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


Patch Set 5: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File src/ovirtnode/ovirtfunctions.py
Line 811:                         logger.error("Failed to persist: " + filename)
Line 812:                         rc = 1
Line 813:                     else:
Line 814:                         logger.info("File: " + filename + " persisted")
Line 815:                         rc = 0
This line code" rc = 0" can be removed.
Line 816:             # register in /config/files used by rc.sysinit
Line 817:             ret = system_closefds("grep -q \"^$" + filename +"$\" " + \
Line 818:                                   " /config/files 2> /dev/null")
Line 819:             if ret > 0:


Line 818:                                   " /config/files 2> /dev/null")
Line 819:             if ret > 0:
Line 820:                 system_closefds("echo "+filename+" >> /config/files")
Line 821:                 logger.info("Successfully persisted: " + filename)
Line 822:                 rc = 0
The rc should not be set to 0 here and this line code should be removed without touching the value of rc.
Line 823:         else:
Line 824:             logger.warn(filename + " Already persisted")
Line 825:     return rc
Line 826: 


--
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: 5
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