Update haproxy-statsd to python3
Change-Id: I1b5c15f0c47a4bf1261abaf6d4e336aad5339c5b
This commit is contained in:
parent
5faf89f566
commit
8ebe74e512
@ -120,11 +120,11 @@ class HAProxy(object):
|
||||
|
||||
def command(self, command):
|
||||
with self.socket as socket:
|
||||
socket.send(command + '\n')
|
||||
socket.send((command + '\n').encode('utf8'))
|
||||
data = ''
|
||||
while True:
|
||||
r = socket.recv(4096)
|
||||
data += r
|
||||
data += r.decode('utf8')
|
||||
if not r:
|
||||
break
|
||||
return data
|
||||
|
Loading…
Reference in New Issue
Block a user