Skip to content

Commit 3e3c6fc

Browse files
committed
multiprocessing: Fix from_bytes/to_bytes calls.
As they're used for internal communication, just use "little" for endianness.
1 parent 1522d3e commit 3e3c6fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

multiprocessing/multiprocessing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ def __repr__(self):
4444

4545
def send(self, obj):
4646
s = pickle.dumps(obj)
47-
self.f.write(len(s).to_bytes(4))
47+
self.f.write(len(s).to_bytes(4, "little"))
4848
self.f.write(s)
4949

5050
def recv(self):
5151
s = self.f.read(4)
5252
if not s:
5353
raise EOFError
54-
l = int.from_bytes(s)
54+
l = int.from_bytes(s, "little")
5555
s = self.f.read(l)
5656
if not s:
5757
raise EOFError

0 commit comments

Comments
 (0)