From c1dc47f1604589888c47837c3bf7b7bb173dab80 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Thu, 20 Feb 2025 11:36:09 +0100 Subject: [PATCH] refs #1588 fix usage of ogFindCache() --- client/lib/engine/bin/ImageLib.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/lib/engine/bin/ImageLib.py b/client/lib/engine/bin/ImageLib.py index 5c5b200..0d3b5d1 100644 --- a/client/lib/engine/bin/ImageLib.py +++ b/client/lib/engine/bin/ImageLib.py @@ -336,7 +336,11 @@ def ogGetSizeParameters (disk, par, repo, imgname, imgtype=None): #Comprobar espacio libre en el contenedor. sizefree = None if 'CACHE' == repo: - cache_disk, cache_par = CacheLib.ogFindCache().split() + CACHEPART = CacheLib.ogFindCache() + if not CACHEPART: + SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_NOTCACHE, '') + return None + cache_disk, cache_par = CACHEPART.split() sizefree = FileSystemLib.ogGetFreeSize (cache_disk, cache_par) if 'REPO' == repo: df_out = subprocess.run (['df', '-k'], capture_output=True, text=True).stdout