mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2024-10-29 19:47:00 +00:00
parent
506aae0ccd
commit
6837a64121
@ -11,6 +11,7 @@ All exceptions should inherit from the common base exception :exc:`ToxPoetryInst
|
||||
+-- LockedDepNotFoundError
|
||||
+-- ExtraNotFoundError
|
||||
+-- LockedDepsRequiredError
|
||||
+-- LockfileParsingError
|
||||
|
||||
"""
|
||||
|
||||
@ -41,3 +42,7 @@ class ExtraNotFoundError(ToxPoetryInstallerException):
|
||||
|
||||
class LockedDepsRequiredError(ToxPoetryInstallerException):
|
||||
"""Environment cannot specify unlocked dependencies when locked dependencies are required"""
|
||||
|
||||
|
||||
class LockfileParsingError(ToxPoetryInstallerException):
|
||||
"""Failed to load or parse the Poetry lockfile"""
|
||||
|
@ -41,10 +41,16 @@ def tox_on_install(
|
||||
|
||||
virtualenv = convert_virtualenv(tox_env)
|
||||
|
||||
if not poetry.locker.is_fresh():
|
||||
logger.warning(
|
||||
f"The Poetry lock file is not up to date with the latest changes in {poetry.file}"
|
||||
)
|
||||
try:
|
||||
if not poetry.locker.is_fresh():
|
||||
logger.warning(
|
||||
f"The Poetry lock file is not up to date with the latest changes in {poetry.file}"
|
||||
)
|
||||
except FileNotFoundError as err:
|
||||
logger.error(f"Could not parse lockfile: {err}")
|
||||
raise exceptions.LockfileParsingError(
|
||||
f"Could not parse lockfile: {err}"
|
||||
) from err
|
||||
|
||||
try:
|
||||
if tox_env.conf["require_locked_deps"] and tox_env.conf["deps"].lines():
|
||||
|
Loading…
Reference in New Issue
Block a user