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:
Diffstat (limited to 'doc/python_api/sphinx_doc_gen.py')
-rw-r--r--doc/python_api/sphinx_doc_gen.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index 3170a2ef469..09e844adae3 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -1483,7 +1483,9 @@ def write_sphinx_conf_py(basepath):
def execfile(filepath):
global_namespace = {"__file__": filepath, "__name__": "__main__"}
- exec(compile(open(filepath).read(), filepath, 'exec'), global_namespace)
+ file_handle = open(filepath)
+ exec(compile(file_handle.read(), filepath, 'exec'), global_namespace)
+ file_handle.close()
def write_rst_contents(basepath):