mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-21 20:51:27 +00:00
Stop failing when old updateinfo doesn't exist
This commit is contained in:
parent
383f28f714
commit
5c60d387d8
@ -285,13 +285,14 @@ async def update_repomd_xml(repomd_xml_path: str, updateinfo: dict):
|
|||||||
f.write(xml_str)
|
f.write(xml_str)
|
||||||
|
|
||||||
# Delete old updateinfo file if not the same as the new one
|
# Delete old updateinfo file if not the same as the new one
|
||||||
updinfo_base = os.path.basename(existing_updateinfo_path)
|
if existing_updateinfo_path:
|
||||||
if existing_updateinfo_path and updinfo_base != updateinfo_path:
|
updinfo_base = os.path.basename(existing_updateinfo_path)
|
||||||
try:
|
if updinfo_base != updateinfo_path:
|
||||||
logger.info("Deleting %s", existing_updateinfo_path)
|
try:
|
||||||
os.remove(existing_updateinfo_path)
|
logger.info("Deleting %s", existing_updateinfo_path)
|
||||||
except FileNotFoundError:
|
os.remove(existing_updateinfo_path)
|
||||||
logger.warning("File %s not found", existing_updateinfo_path)
|
except FileNotFoundError:
|
||||||
|
logger.warning("File %s not found", existing_updateinfo_path)
|
||||||
|
|
||||||
|
|
||||||
async def run_apollo_tree(
|
async def run_apollo_tree(
|
||||||
|
Loading…
Reference in New Issue
Block a user