This is an automated email from the ASF dual-hosted git repository.
kmarlis pushed a commit to branch SDAP-515
in repository https://gitbox.apache.org/repos/asf/sdap-nexus.git
The following commit(s) were added to refs/heads/SDAP-515 by this push:
new 0685007 Improved logging
0685007 is described below
commit 0685007d1b330b1305c380332693ea57967313cc
Author: kevinmarlis <[email protected]>
AuthorDate: Thu May 2 09:49:09 2024 -0700
Improved logging
---
analysis/webservice/redirect/RemoteSDAPCache.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/analysis/webservice/redirect/RemoteSDAPCache.py
b/analysis/webservice/redirect/RemoteSDAPCache.py
index 9bcdc4d..86da833 100644
--- a/analysis/webservice/redirect/RemoteSDAPCache.py
+++ b/analysis/webservice/redirect/RemoteSDAPCache.py
@@ -51,7 +51,7 @@ class RemoteSDAPCache:
else:
raise CollectionNotFound(f"url {list_url} was not reachable,
responded with status {r.status_code}")
except CollectionNotFound as e:
- logger.info(f'URL {url} is unreachable. Skipping. {e}')
+ logger.warning(e)
def get(self, url, short_name):
stripped_url = url.strip('/')
@@ -61,5 +61,5 @@ class RemoteSDAPCache:
for collection in self.sdap_lists[stripped_url].list:
if 'shortName' in collection and collection['shortName'] ==
short_name:
return collection
-
+
raise CollectionNotFound(f"collection {short_name} has not been found
in url {stripped_url}")
\ No newline at end of file