mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
git_sha1_gen: catch any error the same way
Acked-by: Jose Fonseca <jfonseca@vmware.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
This commit is contained in:
parent
44828e99f9
commit
aab0649487
1 changed files with 2 additions and 5 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue