diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/live/ogOperations.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index d98568f..733beae 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -193,6 +193,9 @@ class OgLiveOperations: raise OgError(f'Cannot change repository to {repo}') if cache: + if not get_cache_dev_path(): + raise OgError('No cache partition is mounted') + image_path = f'{OG_CACHE_IMAGE_PATH}{name}.img' if (not os.path.exists(image_path) or not tip_check_csum(repo, name)): @@ -202,7 +205,7 @@ class OgLiveOperations: self._restore_image(image_path, devpath) def _restore_image_tiptorrent(self, repo, name, devpath): - if not os.path.exists(OG_CACHE_IMAGE_PATH): + if not get_cache_dev_path(): raise OgError('No cache partition is mounted') image_path = f'{OG_CACHE_IMAGE_PATH}{name}.img' |