Page MenuHomeSoftware Heritage

D3691.diff
No OneTemporary

D3691.diff

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

Mime Type
text/plain
Expires
Tue, Dec 17, 11:04 PM (2 d, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3229508

Event Timeline