Merge pull request 'refs #2103 unlink() only existing files' (#45) from unlink-existing into main
ogclient/pipeline/head There was a failure building this commit Details
ogclient/pipeline/tag There was a failure building this commit Details

Reviewed-on: #45
pull/46/head 0.13.3
Natalia Serrano 2025-05-28 14:05:51 +02:00
commit 9d1224e0c8
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