[node-patches] Change in ovirt-node[master]: ovirt-node-upgrade: set ret statement correctly

dougsland at redhat.com dougsland at redhat.com
Wed Jan 14 18:24:55 UTC 2015


Douglas Schilling Landgraf has uploaded a new change for review.

Change subject: ovirt-node-upgrade: set ret statement correctly
......................................................................

ovirt-node-upgrade: set ret statement correctly

Move the ret statement equals 0 (non error) when upgrade action is
executed sucessfully instead of call it on the finally clause which
might hide real issues on tools outside ovirt-node-upgrade.

Change-Id: Ia18a7d3b27c01001d47f8a91c59dc33d218f0c57
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1182089
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M scripts/ovirt-node-upgrade.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/21/36921/1

diff --git a/scripts/ovirt-node-upgrade.py b/scripts/ovirt-node-upgrade.py
index 6b8614d..f6adf47 100755
--- a/scripts/ovirt-node-upgrade.py
+++ b/scripts/ovirt-node-upgrade.py
@@ -366,6 +366,7 @@
                 if self._options.reboot > 0:
                     self._reboot(self._options.reboot)
                 self._logger.info("Upgrade Completed")
+                ret = 0
             except Exception as e:
                 self._logger.exception('Error: Upgrade Failed: %s', e)
                 self._run_hooks("rollback")
@@ -373,7 +374,6 @@
                 ret = 1
             finally:
                 self._cleanup()
-                ret = 0
             sys.exit(ret)
 
 if __name__ == "__main__":


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia18a7d3b27c01001d47f8a91c59dc33d218f0c57
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>



More information about the node-patches mailing list