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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user