Skip to content

Commit

Permalink
Fixed problem with reduction.loads(BytesIO())
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Sep 8, 2016
1 parent fa56afa commit 78a5b45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions billiard/reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def loadbuf(cls, buf, protocol=None):

@classmethod
def loads(self, buf, loads=pickle.loads):
if isinstance(buf, io.BytesIO):
buf = buf.getvalue()
return loads(buf)
register = ForkingPickler.register

Expand Down

0 comments on commit 78a5b45

Please sign in to comment.