Mesa (master): git_sha1_gen: catch any error the same way
Eric Engeström
eric_engestrom at kemper.freedesktop.org
Wed Aug 2 14:07:02 UTC 2017
Module: Mesa
Branch: master
Commit: aab06494873bd9f46e8db960ea1f889701d43400
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=aab06494873bd9f46e8db960ea1f889701d43400
Author: Eric Engestrom <eric.engestrom at imgtec.com>
Date: Wed Aug 2 14:57:52 2017 +0100
git_sha1_gen: catch any error the same way
Acked-by: Jose Fonseca <jfonseca at vmware.com>
Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
---
bin/git_sha1_gen.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/bin/git_sha1_gen.py b/bin/git_sha1_gen.py
index fe30084a4f..e26d3a3f76 100755
--- a/bin/git_sha1_gen.py
+++ b/bin/git_sha1_gen.py
@@ -13,11 +13,8 @@ try:
'--short=10',
'HEAD',
], stderr=open(os.devnull, 'w'))
-except subprocess.CalledProcessError as e:
- # don't print anything if git fails
- pass
-except OSError as eos:
- # don't fail on inaccessible files when sandboxed
+except:
+ # don't print anything if it fails
pass
else:
sys.stdout.write('#define MESA_GIT_SHA1 "git-%s"\n' % git_sha1.rstrip())
More information about the mesa-commit
mailing list