git_sha1_gen: fix output on python3
authorEric Engestrom <eric.engestrom@imgtec.com>
Wed, 2 Aug 2017 14:01:21 +0000 (15:01 +0100)
committerEric Engestrom <eric.engestrom@imgtec.com>
Mon, 25 Sep 2017 13:58:26 +0000 (14:58 +0100)
String handling has changed on python3.

Before this patch, on python3:
#define MESA_GIT_SHA1 "git-b'b99dcbfeb3'"
After:
#define MESA_GIT_SHA1 "git-b99dcbfeb3"

(No change on python2, it always looked ok)

Cc: Jose Fonseca <jfonseca@vmware.com>
Fixes: b99dcbfeb344390fea99 "build: Convert git_sha1_gen script to Python."
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
bin/git_sha1_gen.py

index e26d3a3f76478973a6593b84b6b88d7cf241f4ab..97981fbba2476f331d06da7d19c4e85c301476a6 100755 (executable)
@@ -12,7 +12,7 @@ try:
         'rev-parse',
         '--short=10',
         'HEAD',
-    ], stderr=open(os.devnull, 'w'))
+    ], stderr=open(os.devnull, 'w')).decode("ascii")
 except:
     # don't print anything if it fails
     pass