multiprocessing: Fix from_bytes/to_bytes calls.

As they're used for internal communication, just use "little" for
endianness.
pull/121/merge
Paul Sokolovsky 2017-09-03 11:09:05 +03:00
rodzic 1522d3eb15
commit 3e3c6fcaa6
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -44,14 +44,14 @@ class Connection:
def send(self, obj):
s = pickle.dumps(obj)
self.f.write(len(s).to_bytes(4))
self.f.write(len(s).to_bytes(4, "little"))
self.f.write(s)
def recv(self):
s = self.f.read(4)
if not s:
raise EOFError
l = int.from_bytes(s)
l = int.from_bytes(s, "little")
s = self.f.read(l)
if not s:
raise EOFError