Skip to content

Commit

Permalink
Merge pull request #13 from signalfx/connect-logic
Browse files Browse the repository at this point in the history
Fixed string logic in connect
  • Loading branch information
charless-splunk authored Sep 10, 2018
2 parents c00cf05 + a485f1c commit 1feb3ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def connect(self):
return stat_sock
else:
socket_host, separator, port = self.socket_file.rpartition(':')
if socket_host is not '' and port is not '' and separator is ':':
if socket_host != '' and port != '' and separator == ':':
stat_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
stat_sock.connect((socket_host, int(port)))
return stat_sock
Expand Down

0 comments on commit 1feb3ba

Please sign in to comment.