From 31265b71d6ad902cab3bb11e7bdb22e19fd356ef Mon Sep 17 00:00:00 2001 From: Muhammed Hussein Karimi Date: Wed, 30 Oct 2024 14:29:40 +0330 Subject: [PATCH] :bug: Fix index error Signed-off-by: Muhammed Hussein Karimi --- charts/haproxy-redis-sentinel/Chart.yaml | 4 ++-- haproxy_redis_sentinel/cli.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/haproxy-redis-sentinel/Chart.yaml b/charts/haproxy-redis-sentinel/Chart.yaml index d4169ff..fe88e85 100644 --- a/charts/haproxy-redis-sentinel/Chart.yaml +++ b/charts/haproxy-redis-sentinel/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: haproxy-redis-sentinel description: A Helm chart for HAProxy with Redis Sentinel -version: 0.0.3 -appVersion: "0.0.1" +version: 0.0.4 +appVersion: "0.0.2" diff --git a/haproxy_redis_sentinel/cli.py b/haproxy_redis_sentinel/cli.py index 2fe3735..ef3fd47 100644 --- a/haproxy_redis_sentinel/cli.py +++ b/haproxy_redis_sentinel/cli.py @@ -95,7 +95,7 @@ def run( try: master_id = [k for k in sentinel_info.keys() if k.startswith("master") and - sentinel_info[k]["name"] == master_name][1] + sentinel_info[k]["name"] == master_name][0] except IndexError: raise Exception("Unable to find given master by name") address = sentinel_info[master_id]["address"]