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
|
@ -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…
Reference in New Issue