Skip to content

Commit b4d5d1f

Browse files
committed
fix: correct the exception raise
fixes the failing test! Signed-off-by: Oz Tiram <[email protected]>
1 parent 5701434 commit b4d5d1f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Diff for: pipenv/utils/resolver.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -765,10 +765,9 @@ def resolve(cmd, st, project):
765765
out = c.stdout.read()
766766
if returncode != 0:
767767
st.console.print(environments.PIPENV_SPINNER_FAIL_TEXT.format("Locking Failed!"))
768-
# err.print(out.strip())
769768
if not is_verbose:
770769
err.print(errors)
771-
raise RuntimeError("Failed to lock Pipfile.lock!")
770+
raise ResolutionFailure("Failed to lock Pipfile.lock!")
772771
if is_verbose:
773772
err.print(out.strip())
774773
return subprocess.CompletedProcess(c.args, returncode, out, errors)
@@ -904,10 +903,7 @@ def venv_resolve_deps(
904903
cmd.append("--constraints-file")
905904
cmd.append(constraints_file.name)
906905
st.console.print("Resolving dependencies...")
907-
try:
908-
c = resolve(cmd, st, project=project)
909-
except InstallationError:
910-
sys.exit(1)
906+
c = resolve(cmd, st, project=project)
911907
if c.returncode == 0:
912908
try:
913909
with open(target_file.name) as fh:

0 commit comments

Comments
 (0)