Skip to content

Commit

Permalink
Fix AttributeError on hash mismatch
Browse files Browse the repository at this point in the history
This replaces the AttributeError reported in python-poetry#4085 with the proper
exception.
  • Loading branch information
paulmelnikow committed Jun 24, 2021
1 parent 7fac676 commit c5140bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion poetry/installation/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ def _download_link(self, operation: Union[Install, Update], link: Link) -> Link:
)
if archive_hash not in {f["hash"] for f in package.files}:
raise RuntimeError(
f"Invalid hash for {package} using archive {archive.name}"
f"Invalid hash for {package} using archive {archive.filename if isinstance(archive, Link) else archive}"
)

self._hashes[package.name] = archive_hash
Expand Down

0 comments on commit c5140bf

Please sign in to comment.