Page MenuHomeSoftware Heritage

D953.id3010.diff
No OneTemporary

D953.id3010.diff

diff --git a/swh/indexer/metadata_dictionary.py b/swh/indexer/metadata_dictionary.py
--- a/swh/indexer/metadata_dictionary.py
+++ b/swh/indexer/metadata_dictionary.py
@@ -273,12 +273,15 @@
def parse_repository(self, d, repo):
if repo.get('layout', 'default') != 'default':
return # TODO ?
- url = repo['url']
- if d['groupId']:
- url = os.path.join(url, *d['groupId'].split('.'))
- if d['artifactId']:
- url = os.path.join(url, d['artifactId'])
- return {"@id": url}
+ url = repo.get('url')
+ group_id = d.get('groupId')
+ artifact_id = d.get('artifactId')
+ if isinstance(url, str):
+ if isinstance(group_id, str):
+ url = os.path.join(url, *group_id.split('.'))
+ if isinstance(artifact_id, str):
+ url = os.path.join(url, artifact_id)
+ return {"@id": url}
def normalize_groupId(self, id_):
return {"@id": id_}

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 30, 4:39 PM (2 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3224023

Event Timeline