Skip to content

Commit d488c31

Browse files
committed
Fix comparison and remove debug statement
1 parent e9bc901 commit d488c31

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/manage/aliasutils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _create_alias(
9999
p = cmd.global_dir / name
100100
# Raise exception if someone has tried to get us to write outside of the
101101
# intended directory
102-
if p.relative_to(cmd.global_dir).parts != (name,):
102+
if str(p.relative_to(cmd.global_dir)) != name:
103103
raise ValueError(f"Invalid alias name: {name}")
104104
if not p.match("*.exe"):
105105
p = p.with_name(p.name + ".exe")
@@ -239,7 +239,6 @@ def _parse_entrypoint_line(line):
239239
name, sep, rest = line.partition("=")
240240
name = name.strip()
241241
if name and name[0].isalnum() and sep and rest:
242-
print(PurePath(name).parent)
243242
if PurePath(name).parent:
244243
return None, None, None
245244
mod, sep, rest = rest.partition(":")

0 commit comments

Comments
 (0)