diff --git a/scripts/util.py b/scripts/util.py index 7aaca329..24fd0b12 100755 --- a/scripts/util.py +++ b/scripts/util.py @@ -1462,8 +1462,8 @@ def compute(self): return compute_service() @cached_property - def hostname(self): - return socket.gethostname() + def hostname_short(self): + return socket.gethostname().split(".")[0] @cached_property def hostname_fqdn(self): @@ -1485,7 +1485,7 @@ def enable_job_exclusive(self): def _node_desc(self, node_name): """Get parts from node name""" if not node_name: - node_name = self.hostname + node_name = self.hostname_short m = self.node_desc_regex.match(node_name) if not m: raise Exception(f"node name {node_name} is not valid")