Skip to content

Commit 12ff7a3

Browse files
Apply suggestions from code review
Co-authored-by: Wei Zhou <weizhou@apache.org>
1 parent 9e02a1a commit 12ff7a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

systemvm/debian/root/health_checks/haproxy_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def checkLoadBalance(haproxyData, haCfgSections):
5151

5252
bindStr = lbSec["sourceIp"] + ":" + formatPort(lbSec["sourcePortStart"], lbSec["sourcePortEnd"])
5353
bind_line = cfgSection["bind"][0]
54-
bind_token = bind_line.split()[0] if bind_line else ""
55-
if bind_token != bindStr:
54+
bind_token = bind_line.split()[:2] if bind_line else ""
55+
if (" ").join(bind_token) != bindStr:
5656
print("Incorrect bind string found. Expected " + bindStr + " but found " + cfgSection["bind"][0] + ".")
5757
correct = False
5858

0 commit comments

Comments
 (0)