Skip to content

Commit

Permalink
Missing key error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
amanrique1 committed Nov 2, 2023
1 parent 7fd073e commit 8329b3c
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docker/CMSRucioClient/scripts/cmslinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ def _get_rselist(self, rselist=None):
if site.get('rse') in rse:
pnn = site.get('site')
break

self.rselist.append({
'rse': rse,
'pnn': pnn,
'type': attrs.get('cms_type'),
'country': attrs.get('country'),
'region': attrs.get('region', None)
})
try:
self.rselist.append({
'rse': rse,
'pnn': pnn,
'type': attrs.get('cms_type'),
'country': attrs.get('country'),
'region': attrs.get('region')
})
except Exception as e:
logging.warning(f'Could not get attributes for RSE {rse}. Error: {str(e)}')


def _get_matrix(self, distance, exclude):
Expand Down

0 comments on commit 8329b3c

Please sign in to comment.