Skip to content

Commit a75f04e

Browse files
fix: Error message
1 parent 4e1a154 commit a75f04e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

poetry/installation/executor.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -612,15 +612,14 @@ def _download_link(self, operation, link):
612612
hashes = {f["hash"] for f in package.files}
613613
hash_types = {h.split(":")[0] for h in hashes}
614614
archive_hashes = set()
615+
path = url_to_path(archive.url) if isinstance(archive, Link) else archive
615616
for hash_type in hash_types:
616617
archive_hashes.add(
617618
"{}:{}".format(
618619
hash_type,
619620
FileDependency(
620621
package.name,
621-
url_to_path(archive.url)
622-
if isinstance(archive, Link)
623-
else archive,
622+
path,
624623
).hash(hash_type),
625624
)
626625
)
@@ -630,7 +629,7 @@ def _download_link(self, operation, link):
630629
"Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
631630
", ".join(sorted(archive_hashes)),
632631
package,
633-
archive.name,
632+
path.name,
634633
", ".join(sorted(hashes)),
635634
)
636635
)

0 commit comments

Comments
 (0)