1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2025-11-23 18:58:58 +01:00

Don't blow up on missing interpreter

Fixes https://github.com/fedora-python/tox-current-env/issues/5
This commit is contained in:
Miro Hrončok
2019-07-23 14:37:06 +02:00
parent 3bca04c780
commit a1bd7d9cab
2 changed files with 21 additions and 0 deletions

View File

@@ -46,6 +46,8 @@ def tox_testenv_create(venv, action):
return True
if config.option.current_env:
version_info = venv.envconfig.python_info.version_info
if version_info is None:
raise tox.exception.InterpreterNotFound(venv.envconfig.basepython)
if version_info[:2] != sys.version_info[:2]:
raise InterpreterMismatch(
f"tox_current_env: interpreter versions do not match:\n"