Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2011-11-16 03:21:41 +0400
committerMartin Poirier <theeth@yahoo.com>2011-11-16 03:21:41 +0400
commitf07b6e8c85f3554d3daa1c8d06ebd7bd472c235b (patch)
tree97b74de5afe5bc5c0ea4197672e8003dbfac8eb0
parent28e9dc5ba7c5bc871f1ca285875356c6cc0b91ea (diff)
netrender
fix error when sending thumbnail to master
-rw-r--r--netrender/master.py2
-rw-r--r--netrender/slave.py13
2 files changed, 6 insertions, 9 deletions
diff --git a/netrender/master.py b/netrender/master.py
index e3c7399e..66a5d4bd 100644
--- a/netrender/master.py
+++ b/netrender/master.py
@@ -814,7 +814,7 @@ class RenderHandler(http.server.BaseHTTPRequestHandler):
self.send_head(content = None)
if job.hasRenderResult():
- os.path.join(os.path.join(job.save_path, "%06d.jpg" % job_frame))
+ self.write_file(os.path.join(os.path.join(job.save_path, "%06d.jpg" % job_frame)))
else: # frame not found
self.send_head(http.client.NO_CONTENT)
diff --git a/netrender/slave.py b/netrender/slave.py
index 6ae09829..f31bddee 100644
--- a/netrender/slave.py
+++ b/netrender/slave.py
@@ -76,7 +76,7 @@ def testCancel(conn, job_id, frame_number):
else:
return False
-def testFile(conn, job_id, slave_id, rfile, JOB_PREFIX, main_path = None):
+def testFile(conn, job_id, slave_id, rfile, JOB_PREFIX, main_path=None):
job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path)
found = os.path.exists(job_full_path)
@@ -88,11 +88,11 @@ def testFile(conn, job_id, slave_id, rfile, JOB_PREFIX, main_path = None):
if not found:
print("Found file %s at %s but signature mismatch!" % (rfile.filepath, job_full_path))
os.remove(job_full_path)
- job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force = True)
+ job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force=True)
if not found:
# Force prefix path if not found
- job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force = True)
+ job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force=True)
temp_path = os.path.join(JOB_PREFIX, "slave.temp")
with ConnectionContext():
conn.request("GET", fileURL(job_id, rfile.index), headers={"slave-id":slave_id})
@@ -123,8 +123,6 @@ def breakable_timeout(timeout):
break
def render_slave(engine, netsettings, threads):
- # timeout = 1 # UNUSED
-
bisleep = BreakableIncrementedSleep(INCREMENT_TIMEOUT, 1, MAX_TIMEOUT, engine.test_break)
engine.update_stats("", "Network render node initiation")
@@ -142,7 +140,6 @@ def render_slave(engine, netsettings, threads):
conn = clientConnection(netsettings.server_address, netsettings.server_port)
if not conn:
- # timeout = 1 # UNUSED
print("Connection failed, will try connecting again at most %i times" % MAX_CONNECT_TRY)
bisleep.reset()
@@ -204,7 +201,7 @@ def render_slave(engine, netsettings, threads):
netrender.repath.update(job)
- engine.update_stats("", "Render File "+ main_file+ " for job "+ job.id)
+ engine.update_stats("", "Render File " + main_file + " for job " + job.id)
elif job.type == netrender.model.JOB_VCS:
if not job.version_info:
# Need to return an error to server, incorrect job type
@@ -218,7 +215,7 @@ def render_slave(engine, netsettings, threads):
# For VCS jobs, file path is relative to the working copy path
job_full_path = os.path.join(job.version_info.wpath, job_path)
- engine.update_stats("", "Render File "+ main_file+ " for job "+ job.id)
+ engine.update_stats("", "Render File " + main_file + " for job " + job.id)
# announce log to master
logfile = netrender.model.LogFile(job.id, slave_id, [frame.number for frame in job.frames])