Remove path workarounds for old python versions

This commit is contained in:
Simon Brand 2023-02-15 19:25:48 +00:00 committed by Jochen Sprickerhof
parent c5ba4bc848
commit 4a581bdfb6
11 changed files with 79 additions and 110 deletions

View file

@ -87,13 +87,12 @@ def main():
newbuilds.append(new)
app['Builds'] = newbuilds
# rewrite to temporary file before overwriting existsing
# rewrite to temporary file before overwriting existing
# file in case there's a bug in write_metadata
with tempfile.TemporaryDirectory() as tmpdir:
tmp_path = Path(tmpdir) / path.name
metadata.write_metadata(tmp_path, app)
# TODO: Python3.6: Accept path-lik
shutil.move(str(tmp_path), str(path))
shutil.move(tmp_path, path)
logging.debug(_("Finished"))