testlib: Fix hanging tests

When I run

$ MITOGEN_LOG_LEVEL=debug SKIP_ANSIBLE=1 ./run_tests -v -k first_stage_test.CommandLineTest

in a interactive Shell (with a tty), it ends in a hanging process as the
`have_python2` and `have_python3` ends up ends up in an interactive Python
shell. Therefore check the Python version instead.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
pull/1390/head
Marc Hartmayer 3 weeks ago
parent 7be79d05e9
commit 0a559ec8d8

@ -172,11 +172,11 @@ def _have_cmd(args):
def have_python2():
return _have_cmd(['python2'])
return _have_cmd(['python2', '--version'])
def have_python3():
return _have_cmd(['python3'])
return _have_cmd(['python3', '--version'])
def have_sudo_nopassword():

Loading…
Cancel
Save