From 55eefb9b97c4e48a6ed4375f1d44f8d07e50f098 Mon Sep 17 00:00:00 2001 From: Matthieu Imbert <matthieu.imbert@inria.fr> Date: Tue, 31 Oct 2023 16:36:14 +0100 Subject: [PATCH] [execo_g5k] get_host_longname: correct behaviour when site unknown --- src/execo_g5k/api_utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/execo_g5k/api_utils.py b/src/execo_g5k/api_utils.py index 273d915..016fe0b 100644 --- a/src/execo_g5k/api_utils.py +++ b/src/execo_g5k/api_utils.py @@ -653,6 +653,8 @@ def get_host_longname(host): host_site = mo.group(3) else: host_site = get_host_site(host_shortname) + if not host_site: + return None return host_shortname + "." + host_site + ".grid5000.fr" def __get_site_metrics(site, grouped_hosts, metric, from_ts, to_ts, resolution): -- GitLab