Use sock.sendall instead of sock.send (#32)

This commit is contained in:
Michaël Arnauts 2020-06-12 17:02:19 +02:00 committed by GitHub
parent 6e30322f8a
commit 3477fd4aa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ class IPTVManager:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('127.0.0.1', self.port))
try:
sock.send(json.dumps(func()).encode()) # pylint: disable=not-callable
sock.sendall(json.dumps(func()).encode()) # pylint: disable=not-callable
finally:
sock.close()