issue #477: Python 2.4 lacked str.partition.

issue510
David Wilson 6 years ago
parent 2ec19f2374
commit 2ead451277

@ -348,16 +348,18 @@ def get_docker_host():
class DockerizedSshDaemon(object):
distro, _, _py3 = (
os.environ.get('MITOGEN_TEST_DISTRO', 'debian')
.partition('-')
)
python_path = (
'/usr/bin/python3'
if _py3 == 'py3'
else '/usr/bin/python'
)
mitogen_test_distro = os.environ.get('MITOGEN_TEST_DISTRO', 'debian')
if '-' in mitogen_test_distro:
distro, _py3 = mitogen_test_distro.split('-')
else:
distro = mitogen_test_distro
_py3 = None
if _py3 == 'py3':
python_path = '/usr/bin/python3'
else:
python_path = '/usr/bin/python'
image = 'mitogen/%s-test' % (distro,)
# 22/tcp -> 0.0.0.0:32771

Loading…
Cancel
Save