mirror of https://git.48k.eu/ogclient
live: fix omited error report in tip_client_get
tip_client_get raises the proper error exceptions but the except block in _restore_image_tiptorrent overwrites the reported error. Move the raise statements in _restore_image_tiptorrent outside of the except block.master
parent
5ea6f73343
commit
8171ddd15f
|
|
@ -167,17 +167,16 @@ class OgLiveOperations:
|
||||||
|
|
||||||
image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img'
|
image_path = f'/opt/opengnsys/cache/opt/opengnsys/images/{name}.img'
|
||||||
try:
|
try:
|
||||||
if (not os.path.exists(image_path) or
|
if (not os.path.exists(image_path) or not tip_check_csum(repo, name)):
|
||||||
not tip_check_csum(repo, name)):
|
|
||||||
tip_client_get(repo, name)
|
tip_client_get(repo, name)
|
||||||
except:
|
except:
|
||||||
self._restartBrowser(self._url)
|
self._restartBrowser(self._url)
|
||||||
if (not os.path.exists(image_path)):
|
raise
|
||||||
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 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)
|
self._restore_image(image_path, devpath)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue