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.
This commit is contained in:
Sergey Sharybin 2014-06-23 15:46:41 +06:00
parent 3bd965bc03
commit 9b987103f6
2 changed files with 2 additions and 2 deletions

@ -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

@ -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: