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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Dygalo <noreply@developer.blender.org>2016-09-20 13:38:54 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-09-20 13:38:54 +0300
commit87c08fa681f5c9f310abf928b7032992ac2a20b4 (patch)
treea4d7e106f4f7e66689775e109919febe3f282cfd /release
parent075a2175d5e706025473f7416d3bb89b91cc796c (diff)
Small speedup for blend_render_info.py
Do not close and re-open the file in case it's compressed, gzip module can now directly take a file object as parameter. Differential Revision: https://developer.blender.org/D2235
Diffstat (limited to 'release')
-rwxr-xr-xrelease/scripts/modules/blend_render_info.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/modules/blend_render_info.py b/release/scripts/modules/blend_render_info.py
index 5e4ee0ee4b1..30c3ed2388b 100755
--- a/release/scripts/modules/blend_render_info.py
+++ b/release/scripts/modules/blend_render_info.py
@@ -42,8 +42,8 @@ def read_blend_rend_chunk(path):
if head[0:2] == b'\x1f\x8b': # gzip magic
import gzip
- blendfile.close()
- blendfile = gzip.open(path, "rb")
+ blendfile.seek(0)
+ blendfile = gzip.open(blendfile, "rb")
head = blendfile.read(7)
if head != b'BLENDER':