mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-17 04:30:30 +03:00
keep yaml metadata when rewrite failed
This commit is contained in:
parent
cb131b45ab
commit
08acb55897
2 changed files with 13 additions and 13 deletions
|
|
@ -108,10 +108,14 @@ def main():
|
|||
newbuilds.append(new)
|
||||
app.builds = newbuilds
|
||||
|
||||
metadata.write_metadata(base + '.' + to_ext, app)
|
||||
|
||||
if ext != to_ext:
|
||||
os.remove(path)
|
||||
try:
|
||||
metadata.write_metadata(base + '.' + to_ext, app)
|
||||
# remove old format metadata if there was a format change
|
||||
# and rewriting to the new format worked
|
||||
if ext != to_ext:
|
||||
os.remove(path)
|
||||
finally:
|
||||
pass
|
||||
|
||||
logging.debug(_("Finished"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue