diff --git a/glance/async_/flows/plugins/image_conversion.py b/glance/async_/flows/plugins/image_conversion.py index b74fea1f3d..32c7b7fe09 100644 --- a/glance/async_/flows/plugins/image_conversion.py +++ b/glance/async_/flows/plugins/image_conversion.py @@ -15,7 +15,6 @@ import json import os -import sys from oslo_concurrency import processutils as putils from oslo_config import cfg @@ -70,7 +69,7 @@ class _ConvertImage(task.Task): self.action_wrapper = action_wrapper self.image_id = action_wrapper.image_id self.dest_path = "" - self.python = CONF.wsgi.python_interpreter or sys.executable + self.python = CONF.wsgi.python_interpreter super(_ConvertImage, self).__init__( name='%s-Convert_Image-%s' % (task_type, task_id)) diff --git a/glance/tests/unit/async_/flows/plugins/test_image_conversion.py b/glance/tests/unit/async_/flows/plugins/test_image_conversion.py index c5ca29b56a..77d68acf84 100644 --- a/glance/tests/unit/async_/flows/plugins/test_image_conversion.py +++ b/glance/tests/unit/async_/flows/plugins/test_image_conversion.py @@ -15,7 +15,6 @@ import json import os -import sys from unittest import mock import glance_store @@ -266,16 +265,9 @@ class TestConvertImageTask(test_utils.BaseTestCase): image_convert.revert(result=mock.MagicMock()) self.assertEqual(1, mock_os_remove.call_count) - def test_image_convert_interpreter_resolution(self): - # By default, wsgi.python_interpreter is None, which we should - # translate to sys.executable at runtime. - convert = image_conversion._ConvertImage(self.context, - self.task.task_id, - self.task_type, - self.wrapper) - self.assertEqual(sys.executable, convert.python) - - # If overridden, we should take the interpreter from config. + def test_image_convert_interpreter_configured(self): + # By default, wsgi.python_interpreter is None; if it is + # overridden, we should take the interpreter from config. fake_interpreter = '/usr/bin/python2.7' self.config(python_interpreter=fake_interpreter, group='wsgi') diff --git a/requirements.txt b/requirements.txt index d14c82561e..1d24f6a2a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ sqlparse>=0.2.2 # BSD alembic>=0.9.6 # MIT httplib2>=0.9.1 # MIT oslo.config>=8.1.0 # Apache-2.0 -oslo.concurrency>=3.26.0 # Apache-2.0 +oslo.concurrency>=4.5.1 # Apache-2.0 oslo.context>=2.22.0 # Apache-2.0 oslo.upgradecheck>=1.3.0 # Apache-2.0 oslo.utils>=4.7.0 # Apache-2.0