Skip to content

Commit 9ee319a

Browse files
authored
Merge pull request #166 from brianhlin/sw2814_missing_entries
Fix traceback if JOB_ROUTER_ENTRIES not present (SOFTWARE-2814)
2 parents 76c1c7b + 80b8585 commit 9ee319a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/verify_ce_config.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
# Create dict whose values are lists of ads specified in the relevant JOB_ROUTER_* variables
1919
JOB_ROUTER_CONFIG = {}
2020
for attr in ['JOB_ROUTER_DEFAULTS', 'JOB_ROUTER_ENTRIES']:
21-
ads = classad.parseAds(htcondor.param[attr])
21+
try:
22+
ads = classad.parseAds(htcondor.param[attr])
23+
except KeyError:
24+
sys.exit("ERROR: Missing required configuration: %s" % attr)
2225
JOB_ROUTER_CONFIG[attr] = list(ads) # store the ads (iterating through ClassAdStringIterator consumes them)
2326

2427
# Verify job routes. classad.parseAds() ignores malformed ads so we have to compare the unparsed string to the

0 commit comments

Comments
 (0)