git_sha1_gen: create empty file in fallback path

I missed this part in my conversion, the old stream redirection meant
the file was always created.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103496
Fixes: 7088622e5f "buildsys: move file regeneration logic to
       the script itself"
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
This commit is contained in:
Eric Engestrom 2017-10-29 22:06:28 +00:00 committed by Eric Engestrom
parent a1faf48636
commit 2117d03310
1 changed files with 2 additions and 0 deletions

View File

@ -45,3 +45,5 @@ if git_sha1:
quit()
with open(args.output, 'w') as git_sha1_h:
git_sha1_h.write(new_sha1)
else:
open(args.output, 'w').close()