Skip to content
Snippets Groups Projects
Commit 448a94bd authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[bcp][worker] Decode job data if python older than 3.6

Prior to 3.6 the json module handles only str types. After that
more types are supported out of the box.
parent 86049b9d
No related branches found
No related tags found
1 merge request!58Worker: decode recieved job data if python older than 3.6
......@@ -183,6 +183,8 @@ def run(
if command == BCP.BCPE_EXECUTE:
job_id = request.pop(0)
job_data = request.pop(0)
if sys.version_info < (3, 6):
job_data = job_data.decode("utf-8")
data = json.loads(job_data)
reply = [BCP.BCPP_JOB_RECEIVED, job_id]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment