From 71e19ca5849567fbd99348e743f628078b90331e Mon Sep 17 00:00:00 2001 From: "Aldo \"xoen\" Giambelluca" Date: Mon, 30 Sep 2019 12:17:02 +0100 Subject: [PATCH] Fix for KubernetesClient error when no id_token provided That check was in place for some refactoring I'm working on (which should remove the code that reads the ID token from request when not passed). The problem is that currently some of the code don't pass the `id_token` and let the class read from current request. I'm commenting that check for now. --- controlpanel/api/kubernetes.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/controlpanel/api/kubernetes.py b/controlpanel/api/kubernetes.py index 94696a5c9..3d866ed29 100644 --- a/controlpanel/api/kubernetes.py +++ b/controlpanel/api/kubernetes.py @@ -19,12 +19,12 @@ class KubernetesClient: """ def __init__(self, id_token=None, use_cpanel_creds=False): - if not use_cpanel_creds and not id_token: - raise ValueError( - "please provide an id_token (preferred) or pass use_cpanel_creds" - "=True (this would cause the use of the host credentials so " - "be careful when using it)" - ) + # if not use_cpanel_creds and not id_token: + # raise ValueError( + # "please provide an id_token (preferred) or pass use_cpanel_creds" + # "=True (this would cause the use of the host credentials so " + # "be careful when using it)" + # ) if id_token and use_cpanel_creds: raise ValueError(