mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-17 04:30:30 +03:00
Remove path workarounds for old python versions
This commit is contained in:
parent
c5ba4bc848
commit
4a581bdfb6
11 changed files with 79 additions and 110 deletions
|
|
@ -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"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue