Skip to content

Commit

Permalink
Fixes pack(str) -> pack(bytes). Closes celery#3674
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Dec 13, 2016
1 parent a223318 commit 0204d00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions celery/concurrency/asynpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def send_job(tup):
# inqueues are writable.
body = dumps(tup, protocol=protocol)
body_size = len(body)
header = pack('>I', body_size)
header = pack(b'>I', body_size)
# index 1,0 is the job ID.
job = get_job(tup[1][0])
job._payload = buf_t(header), buf_t(body), body_size
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def _create_payload(self, type_, args,
protocol=HIGHEST_PROTOCOL):
body = dumps((type_, args), protocol=protocol)
size = len(body)
header = pack('>I', size)
header = pack(b'>I', size)
return header, body, size

@classmethod
Expand Down

0 comments on commit 0204d00

Please sign in to comment.