summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-11-09 16:02:06 +0000
committerCarl Hetherington <cth@carlh.net>2016-11-09 16:02:06 +0000
commit3368e09b69057abfbe5548c8e29467e181212024 (patch)
treeb0d665cf9bac880837c42d0e5bdbf6163e1efa98 /wscript
parent684ec3d7ba201649f33e9497ffd6cf57ef5b4cbf (diff)
Don't fail to build when we're on a merge commit.
Diffstat (limited to 'wscript')
-rw-r--r--wscript2
1 files changed, 2 insertions, 0 deletions
diff --git a/wscript b/wscript
index c55395c26..eda44b52e 100644
--- a/wscript
+++ b/wscript
@@ -560,6 +560,8 @@ def git_revision():
cmd = "LANG= git log --abbrev HEAD^..HEAD ."
output = subprocess.Popen(cmd, shell=True, stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].splitlines()
+ if len(output) == 0:
+ return None
o = output[0].decode('utf-8')
return o.replace("commit ", "")[0:10]