[Bf-blender-cvs] [9b98710] master: Use specified exception mask for buildinfo
Sergey Sharybin
noreply at git.blender.org
Mon Jun 23 12:13:26 CEST 2014
Commit: 9b987103f6684f9abe55cd536b718bc95cb06f24
Author: Sergey Sharybin
Date: Mon Jun 23 15:46:41 2014 +0600
https://developer.blender.org/rB9b987103f6684f9abe55cd536b718bc95cb06f24
Use specified exception mask for buildinfo
This way we only catch exceptions which we're intended to
and if something bad happens (like missing import due to
refactor or so) we'll see them instantly.
===================================================================
M build_files/scons/tools/Blender.py
M build_files/scons/tools/btools.py
===================================================================
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 4d9fb57..72eafcd 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -414,7 +414,7 @@ def buildinfo(lenv, build_type):
if os.path.isdir(os.path.abspath('.git')):
try:
build_commit_timestamp = subprocess.check_output(args=['git', 'log', '-1', '--format=%ct']).strip()
- except:
+ except OSError:
build_commit_timestamp = None
if not build_commit_timestamp:
# Git command not found
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index bdbb016..d22adfd 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -58,7 +58,7 @@ def get_version():
def get_hash():
try:
build_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
- except:
+ except OSError:
build_hash = None
print("WARNING: could not use git to retrieve current Blender repository hash...")
if build_hash == '' or build_hash == None:
More information about the Bf-blender-cvs
mailing list