Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7123172
D3691.id13002.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D3691.id13002.diff
View Options
diff --git a/swh/loader/package/nixguix/loader.py b/swh/loader/package/nixguix/loader.py
--- a/swh/loader/package/nixguix/loader.py
+++ b/swh/loader/package/nixguix/loader.py
@@ -212,12 +212,22 @@
def clean_sources(sources: Dict[str, Any]) -> Dict[str, Any]:
- """Validate and clean the sources structure. First, it ensures all top
- level keys are presents. Then, it walks on the sources list
- and removes sources that don't contain required keys.
+ """Validate and clean the sources structure. First, ensure all top level keys are
+ present. Then, walk the sources list and remove sources that do not contain required
+ keys.
+
+ Filter out source entries whose:
+ - required keys are missing
+ - source type is not supported
+ - urls attribute type is not a list
Raises:
- ValueError: if a top level key is missing
+ ValueError if:
+ - a required top level key is missing
+ - top-level version is not 1
+
+ Returns:
+ Dict sources
"""
# Required top level keys
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 1:20 AM (6 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3229508
Attached To
D3691: nixguix: Fix docstring
Event Timeline
Log In to Comment