Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9696345
D3437.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
D3437.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
@@ -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
Details
Attached
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
Attached To
D3437: nixguix/loader: Check further the source entry only if it's valid
Event Timeline
Log In to Comment