bugfix for [#23737] reported by Mariusz Maximus

netrender client's functions to get slaves and jobs info didn't work anymore (was reading response content twice).

At the same time, I switched to json for the dump and load, instead of using eval and repr (for obvious security reasons). I should have done this much earlier.
This commit is contained in:
2010-09-12 14:04:54 +00:00
parent 74059891e9
commit 797bb93b21
4 changed files with 19 additions and 15 deletions

View File

@@ -20,6 +20,7 @@ import bpy
import sys, os, re
import http, http.client, http.server, urllib
import subprocess, shutil, time, hashlib
import json
import netrender
import netrender.model
@@ -169,7 +170,7 @@ def clientSendJob(conn, scene, anim = False):
job.priority = netsettings.priority
# try to send path first
conn.request("POST", "/job", repr(job.serialize()))
conn.request("POST", "/job", json.dumps(job.serialize()))
response = conn.getresponse()
response.read()