1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Normalize exception message for dist_info_dir check

This commit is contained in:
Chris Hunt 2019-12-31 13:39:40 -05:00
parent 32115b55af
commit a539c8dfe0

View file

@ -312,9 +312,9 @@ def install_unpacked_wheel(
# installation.
source = wheeldir.rstrip(os.path.sep) + os.path.sep
info_dir = wheel_dist_info_dir(source, req_description, name)
try:
info_dir = wheel_dist_info_dir(source, req_description, name)
metadata = wheel_metadata(wheeldir)
version = wheel_version(metadata)
except UnsupportedWheel as e:
@ -650,8 +650,8 @@ def wheel_dist_info_dir(source, req_description, name):
canonical_name = canonicalize_name(name)
if not info_dir_name.startswith(canonical_name):
raise UnsupportedWheel(
"{} .dist-info directory {!r} does not start with {!r}".format(
req_description, info_dir, canonical_name
".dist-info directory {!r} does not start with {!r}".format(
info_dir, canonical_name
)
)