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.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index 68aebac..00079eb 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -167,17 +167,16 @@ class OgLiveOperations:
image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img'
try:
- if (not os.path.exists(image_path) or
- not tip_check_csum(repo, name)):
+ if (not os.path.exists(image_path) or not tip_check_csum(repo, name)):
tip_client_get(repo, name)
except:
self._restartBrowser(self._url)
- if (not os.path.exists(image_path)):
- raise OgError(f'Image file {image_path} does not exist')
- if (not tip_check_csum(repo, name)):
- raise OgError(f'checksum file {name}.full.sum is missing in repository {repo}')
+ raise
- raise OgError(f'Unexpected error when restoring image file {image_path}')
+ if (not os.path.exists(image_path)):
+ raise OgError(f'Image file {image_path} does not exist')
+ if (not tip_check_csum(repo, name)):
+ raise OgError(f'checksum file {name}.full.sum is missing in repository {repo}')
self._restore_image(image_path, devpath)