Skip to content

Commit

Permalink
Handle None values for link channel name gracefully
Browse files Browse the repository at this point in the history
This was already done for the channel name of the package to unlink
in conda#8379, but the linking package channel name was missed.

If not handled gracefully, this exits with a TypeError when e.g.
updating a package from a 3rd party channel with a custom URL.
  • Loading branch information
teake committed May 17, 2019
1 parent 6ae4387 commit df670f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion conda/core/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,8 @@ def diff_strs(unlink_prec, link_prec):
if channel_change or subdir_change:
if unlink_prec.channel.name is not None:
builder_left.append(unlink_prec.channel.name)
builder_right.append(link_prec.channel.name)
if link_prec.channel.name is not None:
builder_right.append(link_prec.channel.name)
if subdir_change:
builder_left.append("/" + unlink_prec.subdir)
builder_right.append("/" + link_prec.subdir)
Expand Down

0 comments on commit df670f7

Please sign in to comment.