diff --git a/docker/CMSRucioClient/scripts/cmslinks.py b/docker/CMSRucioClient/scripts/cmslinks.py index b1b30f7a..6517e949 100755 --- a/docker/CMSRucioClient/scripts/cmslinks.py +++ b/docker/CMSRucioClient/scripts/cmslinks.py @@ -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):