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

rbarry at redhat.com rbarry at redhat.com
Mon Nov 17 19:23:21 UTC 2014


Ryan Barry 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>
---
M scripts/ovirt-node-upgrade.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/49/35249/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/35249
To unsubscribe, visit http://gerrit.ovirt.org/settings

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



More information about the node-patches mailing list