From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: drop constants.EXT_PYTHON
......................................................................
drop constants.EXT_PYTHON
commands_test can use any python, and gluster.gfapi's ugly hack may well
use its own private cconstant.
Change-Id: I826a89d4b63f0b4217173795638600a533a82f5c
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M lib/vdsm/gluster/gfapi.py
M tests/commands_test.py
3 files changed, 4 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/33/79733/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index a123a26..f851065 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -105,8 +105,6 @@
EXT_NICE = '@NICE_PATH@'
-EXT_PYTHON = '@PYTHON@'
-
EXT_SETSID = '@SETSID_PATH@'
EXT_SH = '/bin/sh' # The shell path is invariable
EXT_SU = '@SU_PATH@'
diff --git a/lib/vdsm/gluster/gfapi.py b/lib/vdsm/gluster/gfapi.py
index cafb9e0..4976a53 100644
--- a/lib/vdsm/gluster/gfapi.py
+++ b/lib/vdsm/gluster/gfapi.py
@@ -27,6 +27,7 @@
from . import gluster_mgmt_api
+EXT_PYTHON = '/usr/bin/python2'
GLUSTER_VOL_PROTOCOL = 'tcp'
GLUSTER_VOL_HOST = 'localhost'
GLUSTER_VOL_PORT = 24007
@@ -217,7 +218,7 @@
port=GLUSTER_VOL_PORT,
protocol=GLUSTER_VOL_PROTOCOL):
module = "vdsm.gluster.gfapi"
- command = [constants.EXT_PYTHON, '-m', module, '-v', volumeName,
+ command = [EXT_PYTHON, '-m', module, '-v', volumeName,
'-p', str(port), '-H', host, '-t', protocol,
'-c', 'statvfs']
# to include /usr/share/vdsm in python path
@@ -248,7 +249,7 @@
port=GLUSTER_VOL_PORT,
protocol=GLUSTER_VOL_PROTOCOL):
module = "gluster.gfapi"
- command = [constants.EXT_PYTHON, '-m', module, '-v', volumeName,
+ command = [EXT_PYTHON, '-m', module, '-v', volumeName,
'-p', str(port), '-H', host, '-t', protocol,
'-c', 'readdir']
# to include /usr/share/vdsm in python path
diff --git a/tests/commands_test.py b/tests/commands_test.py
index 8b12357..b7f42db 100644
--- a/tests/commands_test.py
+++ b/tests/commands_test.py
@@ -58,7 +58,7 @@
@permutations(CMD_TYPES)
def testSetSid(self, cmd):
- cmd_args = (constants.EXT_PYTHON, '-c',
+ cmd_args = ('python', '-c',
'import os; print os.getsid(os.getpid())')
rc, out, _ = commands.execCmd(cmd(cmd_args), setsid=True)
self.assertNotEquals(int(out[0]), os.getsid(os.getpid()))
--
To view, visit
https://gerrit.ovirt.org/79733
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I826a89d4b63f0b4217173795638600a533a82f5c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>