topotests: look for python3 exabgp

Look for python3 exabgp instead of python2.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
Louis Scalbert 2023-11-28 12:44:13 +01:00
parent 92c1a102e4
commit 9589fb300d

View File

@ -102,14 +102,14 @@ def get_exabgp_cmd(commander=None):
exacmd = commander.get_exec_path("exabgp") exacmd = commander.get_exec_path("exabgp")
if exacmd and exacmd_version_ok(exacmd): if exacmd and exacmd_version_ok(exacmd):
return exacmd return exacmd
py2_path = commander.get_exec_path("python2") py3_path = commander.get_exec_path("python3")
if py2_path: if py3_path:
exacmd = py2_path + " -m exabgp" exacmd = py3_path + " -m exabgp"
if exacmd_version_ok(exacmd): if exacmd_version_ok(exacmd):
return exacmd return exacmd
py2_path = commander.get_exec_path("python") py3_path = commander.get_exec_path("python")
if py2_path: if py3_path:
exacmd = py2_path + " -m exabgp" exacmd = py3_path + " -m exabgp"
if exacmd_version_ok(exacmd): if exacmd_version_ok(exacmd):
return exacmd return exacmd
return None return None