Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163844
D953.id3010.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1016 B
Subscribers
None
D953.id3010.diff
View Options
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
Details
Attached
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
Attached To
D953: Prevent repository normalization from crashing on malformed input.
Event Timeline
Log In to Comment