From cf53a987f50b967ce225cab14df90eee77d82fff Mon Sep 17 00:00:00 2001 From: Andre Maroneze <andre.maroneze@cea.fr> Date: Mon, 27 Jul 2020 18:38:52 +0200 Subject: [PATCH] [analysis-scripts] simplify summary.py --- share/analysis-scripts/summary.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/analysis-scripts/summary.py b/share/analysis-scripts/summary.py index 0b2fc9c9fba..77da19d6aa3 100755 --- a/share/analysis-scripts/summary.py +++ b/share/analysis-scripts/summary.py @@ -55,11 +55,11 @@ def list_targets(dir): targets = res.stdout.split() res = [] for target in targets: - if target.endswith(".eva") or target.endswith(".parse"): - res.append(dir + "/" + target) + target_path = f"{dir}/{target}" + if os.path.isdir(target_path): + res.append(target_path) else: - res += [dir + "/" + t for t in list_targets(target)] - print(f"list_targets returning: {res}") + raise OperationException(f"target is not a directory: {target_path}") return res def clone_frama_c(clonedir, hash): -- GitLab