diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-06-20 20:13:20 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-06-20 20:13:20 +0400 |
commit | 9b83ceb6f2865f77aca0c0bdcce4e1b6c5cdef8b (patch) | |
tree | 4a6c214286358129c704f3335eee337e90be4aeb /build_files/scons/tools/btools.py | |
parent | 01d802976fc89b97a5a67a0dacdaf414db2651ca (diff) |
Fix scons building in case git is not available.
Not so nice to use try/except here, but simplest solution to avoid failing in case
git commands fail for some reason...
Diffstat (limited to 'build_files/scons/tools/btools.py')
-rw-r--r-- | build_files/scons/tools/btools.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index 08a3eec45ba..bdbb016be1b 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -56,7 +56,11 @@ def get_version(): raise Exception("%s: missing version string" % fname) def get_hash(): - build_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip() + try: + build_hash = subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).strip() + except: + build_hash = None + print("WARNING: could not use git to retrieve current Blender repository hash...") if build_hash == '' or build_hash == None: build_hash = 'UNKNOWN' |