From e76d177a713b10a92525f09dbd3199a090d14d8f Mon Sep 17 00:00:00 2001 From: jh245g Date: Mon, 6 Aug 2018 14:30:01 -0400 Subject: Fix bug in basic authentication Change-Id: If3f8231b5a3330009379d6d20d47f0be895ecdc8 Issue-ID: CCSDK-425 Signed-off-by: jh245g --- helm/plugin/tasks.py | 2 +- helm/plugin/workflows.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'helm') diff --git a/helm/plugin/tasks.py b/helm/plugin/tasks.py index 5ff7df8..4ffcd81 100644 --- a/helm/plugin/tasks.py +++ b/helm/plugin/tasks.py @@ -220,7 +220,7 @@ def config(**kwargs): if configJson == '' and configUrl == '': ctx.logger.debug("Will use default HELM value") elif configJson == '' and configUrl != '': - if configUrl.find("@"): + if configUrl.find("@") != -1: head, end = configUrl.rsplit('@', 1) head, auth = head.rsplit('//', 1) configUrl = head + '//' + end diff --git a/helm/plugin/workflows.py b/helm/plugin/workflows.py index 9870bdf..2999b73 100644 --- a/helm/plugin/workflows.py +++ b/helm/plugin/workflows.py @@ -38,7 +38,7 @@ def upgrade(node_instance_id, config_json, config_url, config_format, if config_json == '' and config_url == '': kwargs['config'] = config_json elif config_json == '' and config_url != '': - if config_url.find("@"): + if config_url.find("@") != -1: head, end = config_url.rsplit('@', 1) head, auth = head.rsplit('//', 1) config_url = head + '//' + end -- cgit 1.2.3-korg