From 084650e4b1650386d55a2c14f17c745c3fcb913f Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Mon, 9 Sep 2024 12:22:17 +0200 Subject: live: use correct variable name in restore unicast cache fe40f9c5 ('src: add POST cache/fetch method') broke unicast cache restore. (2024-09-09 10:05:22) ogClient: [ERROR] - name 'image_name' is not defined Traceback (most recent call last): File "/opt/opengnsys/ogClient/src/ogRest.py", line 175, in image_restore payload = ogRest.operations.image_restore(request, ogRest) File "/opt/opengnsys/ogClient/src/live/ogOperations.py", line 520, in image_restore self._restore_image_unicast(repo, name, partdev, cache) File "/opt/opengnsys/ogClient/src/live/ogOperations.py", line 242, in _restore_image_unicast image_path = f'{OG_CACHE_IMAGE_PATH}{image_name}.img' NameError: name 'image_name' is not defined --- src/live/ogOperations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 0a2232b..010af05 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -239,7 +239,7 @@ class OgLiveOperations: if cache: self._fetch_image_unicast(repo, name) - image_path = f'{OG_CACHE_IMAGE_PATH}{image_name}.img' + image_path = f'{OG_CACHE_IMAGE_PATH}{name}.img' else: if os.access(f'/opt/opengnsys/images', os.R_OK) == False: raise OgError('Cannot access /opt/opengnsys/images in read mode, check permissions') -- cgit v1.2.3-18-g5258