diff options
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/scons/tools/Blender.py | 5 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index a506d2c08f9..4d9fb578c06 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -412,7 +412,10 @@ def buildinfo(lenv, build_type): build_time = time.strftime ("%H:%M:%S") if os.path.isdir(os.path.abspath('.git')): - build_commit_timestamp = subprocess.check_output(args=['git', 'log', '-1', '--format=%ct']).strip() + try: + build_commit_timestamp = subprocess.check_output(args=['git', 'log', '-1', '--format=%ct']).strip() + except: + build_commit_timestamp = None if not build_commit_timestamp: # Git command not found build_hash = 'unknown' 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' |