summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/live/ogOperations.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index 5417a7c..44d8f1b 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -610,12 +610,16 @@ class OgLiveOperations:
images = request.getImages()
deleted_images = []
+ logging.info(f'Request to remove files from cache')
+
if not mount_cache():
+ logging.error(f'Cache is not mounted')
return
img_dir = OG_CACHE_IMAGE_PATH
if not os.path.isdir(img_dir):
+ logging.error(f'{img_dir} is not a directory')
return cache_contents
for file_name in os.listdir(img_dir):
@@ -630,20 +634,22 @@ class OgLiveOperations:
continue
if file_name in images:
+ logging.info(f'Removing file {file_path} from cache')
os.remove(file_path)
csum_path = file_path + '.full.sum'
if not os.path.isfile(csum_path):
- logging.info(f'Missing checksum file for {file_path}')
+ logging.info(f'Missing checksum file {csum_path}')
continue
+ logging.info(f'Removing checksum file {csum_path} from cache')
os.remove(csum_path)
result = {'cache': self._get_cache_contents()}
self._restartBrowser(self._url)
- logging.info('Sending response to cache/delete request')
+ logging.info('Delete file from cache request OK')
return result
def refresh(self, ogRest):