mirror of
https://github.com/resf/distro-tools.git
synced 2024-11-25 14:41:28 +00:00
Don't delete updateinfo if it's same as new
This commit is contained in:
parent
de3d7526f2
commit
b8fa293e33
@ -268,8 +268,8 @@ async def update_repomd_xml(repomd_xml_path: str, updateinfo: dict):
|
|||||||
with open(repomd_xml_path, "w", encoding="utf-8") as f:
|
with open(repomd_xml_path, "w", encoding="utf-8") as f:
|
||||||
f.write(xml_str)
|
f.write(xml_str)
|
||||||
|
|
||||||
# Delete old updateinfo file
|
# Delete old updateinfo file if not the same as the new one
|
||||||
if existing_updateinfo_path:
|
if existing_updateinfo_path and existing_updateinfo_path != updateinfo_path:
|
||||||
try:
|
try:
|
||||||
logger.info("Deleting %s", existing_updateinfo_path)
|
logger.info("Deleting %s", existing_updateinfo_path)
|
||||||
os.remove(existing_updateinfo_path)
|
os.remove(existing_updateinfo_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user