From df670f7aa70acc19f1a326d0f52d0cf0afe5695f Mon Sep 17 00:00:00 2001
From: Teake Nutma <teake.nutma@gmail.com>
Date: Fri, 17 May 2019 14:45:05 +0200
Subject: [PATCH] Handle None values for link channel name gracefully

This was already done for the channel name of the package to unlink
in #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.
---
 conda/core/link.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/conda/core/link.py b/conda/core/link.py
index 89da6684c76..ab72c06bba7 100644
--- a/conda/core/link.py
+++ b/conda/core/link.py
@@ -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)