From 85684cf8bbba933e0fb6a68ddc46a02d2913d23a Mon Sep 17 00:00:00 2001 From: Andrew Bonney Date: Tue, 9 Jan 2024 14:37:46 +0000 Subject: [PATCH] Fix proxy detection when no config is present --- magnum_cluster_api/utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/magnum_cluster_api/utils.py b/magnum_cluster_api/utils.py index 735dec95..11370edf 100644 --- a/magnum_cluster_api/utils.py +++ b/magnum_cluster_api/utils.py @@ -201,8 +201,8 @@ def generate_containerd_config( def generate_systemd_proxy_config(cluster: magnum_objects.Cluster): if ( - cluster.cluster_template.http_proxy != "" - or cluster.cluster_template.https_proxy != "" + cluster.cluster_template.http_proxy is not None + or cluster.cluster_template.https_proxy is not None ): return textwrap.dedent( """\ @@ -225,8 +225,8 @@ def generate_systemd_proxy_config(cluster: magnum_objects.Cluster): def generate_apt_proxy_config(cluster: magnum_objects.Cluster): if ( - cluster.cluster_template.http_proxy != "" - or cluster.cluster_template.https_proxy != "" + cluster.cluster_template.http_proxy is not None + or cluster.cluster_template.https_proxy is not None ): return textwrap.dedent( """\