Page MenuHomeSoftware Heritage

D3437.diff
No OneTemporary

D3437.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
@@ -214,14 +214,14 @@
"Skip source '%s' because key '%s' is missing", source, required_key
)
valid = False
- if source["type"] != "url":
+ if valid and source["type"] != "url":
logger.info(
"Skip source '%s' because the type %s is not supported",
source,
source["type"],
)
valid = False
- if not isinstance(source["urls"], list):
+ if valid and not isinstance(source["urls"], list):
logger.info(
"Skip source '%s' because the urls attribute is not a list", source
)
diff --git a/swh/loader/package/nixguix/tests/test_nixguix.py b/swh/loader/package/nixguix/tests/test_nixguix.py
--- a/swh/loader/package/nixguix/tests/test_nixguix.py
+++ b/swh/loader/package/nixguix/tests/test_nixguix.py
@@ -83,6 +83,8 @@
{"type": "url", "urls": "my-url", "integrity": "my-integrity"},
# type is not url
{"type": "git", "urls": ["my-url"], "integrity": "my-integrity"},
+ # missing fields which got double-checked nonetheless...
+ {"integrity": "my-integrity"},
],
"revision": "my-revision",
}

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 17, 7:54 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3216697

Event Timeline