summaryrefslogtreecommitdiffstats
path: root/src/live/ogOperations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/live/ogOperations.py')
-rw-r--r--src/live/ogOperations.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index df0c2e1..5b55422 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -139,7 +139,16 @@ class OgLiveOperations:
logging.error(f'Cannot read checksum file {checksum_file_path}: {e}')
if not image_checksum:
- logging.error(f'Empty checksum for image {file_name}')
+ logging.info(f'Removing {file_name} with no checksum file from cache, maybe partial download?')
+ try:
+ if os.path.exists(file_path):
+ os.unlink(file_path)
+ if os.path.exists(checksum_file_path):
+ os.unlink(checksum_file_path)
+ except OSError as e:
+ pass
+
+ continue
image_size = os.stat(file_path).st_size
cache_contents.append({