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
master v1.3.2-18
OpenGnSys Support Team 2024-09-09 12:22:17 +02:00
parent 05b7a576b0
commit 084650e4b1
1 changed files with 1 additions and 1 deletions

View File

@ -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')