refs #1588 fix usage of ogFindCache()

pull/1/head
Natalia Serrano 2025-02-20 11:36:09 +01:00
parent caf1f44161
commit c1dc47f160
1 changed files with 5 additions and 1 deletions

View File

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