summaryrefslogtreecommitdiffstats
path: root/src/live
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-03-18 20:26:31 +0100
committerlupoDharkael <izhe@hotmail.es>2024-03-21 10:29:57 +0100
commit8741b2e2724fabb25465c06c3a4f881d9aa28d67 (patch)
tree05d065a70a6d0b28c714047f6c111077827cc1c1 /src/live
parent167fd296343870a5e6f94eaba749bc7722d2e7cb (diff)
src: change generic exception types to be more explicit
Replace exception types to be more explicit about the nature of the error. Improve the exception raising semantics by using the 'from' keyword, this wraps an older exception into a new one so it is still considered the same object.
Diffstat (limited to 'src/live')
-rw-r--r--src/live/ogOperations.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index d564ea9..d3b9d58 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -172,11 +172,11 @@ class OgLiveOperations:
except:
self._restartBrowser(self._url)
if (not os.path.exists(image_path)):
- raise ValueError(f'Image file {image_path} does not exist')
+ raise RuntimeError(f'Image file {image_path} does not exist')
if (not tip_check_csum(repo, name)):
- raise ValueError(f'checksum file {name}.full.sum is missing in repository {repo}')
+ raise RuntimeError(f'checksum file {name}.full.sum is missing in repository {repo}')
- raise ValueError(f'Unexpected error when restoring image file {image_path}')
+ raise RuntimeError(f'Unexpected error when restoring image file {image_path}')
self._restore_image(image_path, devpath)