scons: Fix git_sha1.h generation fallback.

I didn't meant to remove the 'if not os.path.exists(filename)' statement.

Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Jose Fonseca
2015-03-23 10:48:31 +00:00
parent 31a30fb342
commit 5db57b8a55

View File

@@ -130,6 +130,7 @@ def write_git_sha1_h_file(filename):
(commit, foo) = subprocess.Popen(args, stdout=subprocess.PIPE).communicate() (commit, foo) = subprocess.Popen(args, stdout=subprocess.PIPE).communicate()
except: except:
# git log command didn't work # git log command didn't work
if not os.path.exists(filename):
dirname = os.path.dirname(filename) dirname = os.path.dirname(filename)
if not os.path.exists(dirname): if not os.path.exists(dirname):
os.makedirs(dirname) os.makedirs(dirname)