From 322e5a6682eb765dad301bfbdbab2fd05bbfd9e2 Mon Sep 17 00:00:00 2001 From: Matthew Westphall Date: Fri, 1 May 2026 10:52:39 -0500 Subject: [PATCH] SOFTWARE-6342: Add missing try/catch block --- common/gratia/common/condor.py | 5 ++++- rpm/gratia-probe.spec | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/common/gratia/common/condor.py b/common/gratia/common/condor.py index 3bd79f43..f0d8de54 100644 --- a/common/gratia/common/condor.py +++ b/common/gratia/common/condor.py @@ -564,7 +564,10 @@ def cream_match(match, desired): def get_classad_resource_name(classad): for attr in RESOURCE_NAME_ATTRS: - resource_name = classad.eval(attr) + try: + resource_name = classad.eval(attr) + except (KeyError, ValueError): + continue if resource_name and resource_name is not classadLib.Value.Undefined and resource_name is not classadLib.Value.Error: return resource_name return None diff --git a/rpm/gratia-probe.spec b/rpm/gratia-probe.spec index 8be41043..73595ab7 100644 --- a/rpm/gratia-probe.spec +++ b/rpm/gratia-probe.spec @@ -2,7 +2,7 @@ Name: gratia-probe Summary: Gratia OSG accounting system probes Group: Applications/System Version: 2.9.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL URL: https://github.com/opensciencegrid/gratia-probe Vendor: The Open Science Grid @@ -607,6 +607,9 @@ This is a transitional dummy package for gratia-probe-slurm; it may safely be re %files slurm %changelog +* Fri May 1 2026 Matt Westphall - 2.9.1-3 +- Add missing try/catch block (SOFTWARE-6342) + * Thu Feb 5 2026 Matt Westphall - 2.9.1-2 - Add check for empty classad resource names