Skip to content
Snippets Groups Projects
Commit e8a5f257 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

browse/utils: Fix get_origin_info implementation

parent 661f410b
No related branches found
No related tags found
No related merge requests found
......@@ -807,10 +807,13 @@ def get_origin_info(origin_url, origin_type=None):
'url': origin_url})
else:
for origin_type in _swh_origin_types:
origin_info = service.lookup_origin({'type': origin_type,
'url': origin_url})
if origin_info:
try:
origin_info = service.lookup_origin({'type': origin_type,
'url': origin_url})
return origin_info
except Exception:
pass
return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment