From 3f38c056b87d12c71939521794621bc8e66a854b Mon Sep 17 00:00:00 2001 From: Radek Vykydal Date: Jul 08 2020 10:53:56 +0000 Subject: Merge pull request #2711 from M4rtinK/rhel-8-fix_rhsm_ks_command_proxy_option subscription: Fix rhsm --proxy kickstart command usage with no userna… --- diff --git a/pyanaconda/modules/subscription/subscription.py b/pyanaconda/modules/subscription/subscription.py index 9fc36de..bcbcccc 100644 --- a/pyanaconda/modules/subscription/subscription.py +++ b/pyanaconda/modules/subscription/subscription.py @@ -211,7 +211,10 @@ class SubscriptionService(KickstartService): subscription_request.server_proxy_hostname = proxy.host subscription_request.server_proxy_port = port - subscription_request.server_proxy_user = proxy.username + + # ensure no username translates to the expected "" + # instead of the None returned by the ProxyString class + subscription_request.server_proxy_user = proxy.username or "" subscription_request.server_proxy_password.set_secret(proxy.password) except ProxyStringError as e: # should not be fatal, but definitely logged as error