refs #2103 unlink() only existing files

pull/45/head
Natalia Serrano 2025-05-28 14:05:18 +02:00
parent d7fa82636a
commit 02b6708442
2 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.13.3] - 2025-05-28
### Fixed
- unlink() only existing files
## [0.13.2] - 2025-05-28
### Changed

View File

@ -926,6 +926,7 @@ def ogUpdateCacheIsNecesary (repo, file, proto):
else:
print ('imagen en cache distinta, borramos la imagen anterior')
for f in [f'{filetarget}', f'{filetarget}.sum', f'{filetarget}.torrent', f'{filetarget}.full.sum']:
os.unlink (f)
if os.path.exists (f):
os.unlink (f)
print ('TRUE (0), Si es necesario actualizar.')
return True