Add import exception to Poetry import error message

Fixes #96
This commit is contained in:
2024-08-13 13:08:12 -04:00
parent 62f90de297
commit fdaee670c4
2 changed files with 4 additions and 4 deletions

View File

@@ -46,9 +46,9 @@ def check_preconditions(venv: ToxVirtualEnv) -> "_poetry.Poetry":
#
# ``RuntimeError`` is dangerous to blindly catch because it can be (and in Poetry's case,
# is) raised in many different places for different purposes.
except RuntimeError:
except RuntimeError as err:
raise exceptions.SkipEnvironment(
"Project does not use Poetry for env management, skipping installation of locked dependencies"
f"Skipping installation of locked dependencies due to a Poetry error: {err}"
) from None