From acdaf9ab8f88a86e925d3ae78a95f329ceccc0ce Mon Sep 17 00:00:00 2001 From: jerome servonnat Date: Mon, 28 Aug 2023 12:16:33 +0200 Subject: [PATCH] Fix the cdu() error --- climaf/cache.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/climaf/cache.py b/climaf/cache.py index d0ffd3e0..fe86793b 100644 --- a/climaf/cache.py +++ b/climaf/cache.py @@ -913,7 +913,10 @@ def clist(size="", age="", access=0, pattern="", not_pattern="", usage=False, co dic_usage = dict() tmp = "" for crs in work_dic: - tmp += work_dic[crs] + " " + if isinstance(work_dic[crs], tuple): + tmp += work_dic[crs][0] + " " + if isinstance(work_dic[crs], str): + tmp += work_dic[crs] + " " res = os.popen("du -sc %s" % tmp).read() regex = re.compile('([0-9]+)\t')