[node-patches] Change in ovirt-node[ovirt-3.5]: insert upgrade's /site-packages into sys.path, not append

fabiand at redhat.com fabiand at redhat.com
Thu Dec 18 14:20:05 UTC 2014


Fabian Deutsch has uploaded a new change for review.

Change subject: insert upgrade's /site-packages into sys.path, not append
......................................................................

insert upgrade's /site-packages into sys.path, not append

Put the upgrade image's /site-packages at the head of the line, so
updated ovirt.node.* modules from there get picked up first.
Particularly important for migration and upgrade modules.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1053430
Change-Id: I277245d3aa12cbc336786703e9db0be0224bc072
Signed-off-by: Ryan Barry <rbarry at redhat.com>
(cherry picked from commit baf3675061241ad18ab1de885cc177ea8f1acbbf)
---
M scripts/ovirt-node-upgrade.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/80/36280/1

diff --git a/scripts/ovirt-node-upgrade.py b/scripts/ovirt-node-upgrade.py
index fc668ef..6b8614d 100755
--- a/scripts/ovirt-node-upgrade.py
+++ b/scripts/ovirt-node-upgrade.py
@@ -219,7 +219,7 @@
         if not self._python_lib:
             raise RuntimeError("Unable to determine python path")
         self._python_lib = self._python_lib[0]
-        sys.path.append(self._python_lib + "/site-packages/")
+        sys.path.insert(0, self._python_lib + "/site-packages/")
         self._tmp_python_path = "%s/site-packages/ovirtnode" \
             % self._python_lib
         shutil.copytree(self._tmp_python_path, self._ovirtnode_dir)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I277245d3aa12cbc336786703e9db0be0224bc072
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list