gitlab: add missing f.truncate() call to update.py script
when updating data.json, truncate file after reading and before writing again, or we otherwise might end up with broken json
This commit is contained in:
parent
747fd9fb00
commit
78f336b21d
@ -115,6 +115,7 @@ def _update_data_json(filename: str, repo: GitLabRepo, rev: str, flavour: str):
|
||||
data = json.load(f)
|
||||
data[flavour] = flavour_data
|
||||
f.seek(0)
|
||||
f.truncate()
|
||||
json.dump(data, f, indent=2)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user