Use sock.sendall instead of sock.send (#32)
This commit is contained in:
parent
6e30322f8a
commit
3477fd4aa2
@ -30,7 +30,7 @@ class IPTVManager:
|
|||||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
sock.connect(('127.0.0.1', self.port))
|
sock.connect(('127.0.0.1', self.port))
|
||||||
try:
|
try:
|
||||||
sock.send(json.dumps(func()).encode()) # pylint: disable=not-callable
|
sock.sendall(json.dumps(func()).encode()) # pylint: disable=not-callable
|
||||||
finally:
|
finally:
|
||||||
sock.close()
|
sock.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user