fix calling _get_diagnostics if python versions do not match

This commit is contained in:
Christopher Lackner 2023-05-23 08:59:05 +02:00
parent b1b2f17c09
commit c1ed3e36ca

View File

@ -26,7 +26,7 @@ def _check_python_version():
compile_version = f"{config.PYTHON_VERSION_MAJOR}.{config.PYTHON_VERSION_MINOR}" compile_version = f"{config.PYTHON_VERSION_MAJOR}.{config.PYTHON_VERSION_MINOR}"
if sys_version != compile_version: if sys_version != compile_version:
print(get_diagnostics(), file=sys.stderr) print(_get_diagnostics(), file=sys.stderr)
raise RuntimeError(f"Python version mismatch: compile-time version is {compile_version}, run-time version is {sys_version}") raise RuntimeError(f"Python version mismatch: compile-time version is {compile_version}, run-time version is {sys_version}")
_check_python_version() _check_python_version()