Skip to content

Commit c1bfec8

Browse files
committed
Allow install_dir to be optional for logging
1 parent 768deb8 commit c1bfec8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/manage/aliasutils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def _create_alias(
116116
launcher = _if_exists(launcher, "-64")
117117
chosen_by = "fallback default"
118118
LOGGER.debug("Create %s for %s using %s, chosen by %s", name,
119-
relative_to(target, cmd.install_dir), launcher, chosen_by)
119+
relative_to(target, getattr(cmd, "install_dir", None)),
120+
launcher, chosen_by)
120121
if not launcher or not launcher.is_file():
121122
raise NoLauncherTemplateError()
122123

@@ -268,7 +269,8 @@ def _scan_one(cmd, install, root):
268269
entrypoints = [f for f in [d / "entry_points.txt" for d in dist_info] if f.is_file()]
269270
if len(entrypoints):
270271
LOGGER.debug("Found %i entry_points.txt files in %i dist-info in %s",
271-
len(entrypoints), len(dist_info), relative_to(root, cmd.install_dir))
272+
len(entrypoints), len(dist_info),
273+
relative_to(root, getattr(cmd, "install_dir", None)))
272274

273275
# Filter down to [console_scripts] and [gui_scripts]
274276
for ep in entrypoints:

0 commit comments

Comments
 (0)