Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/package/nixguix/loader.py
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | for required_key in required_keys: | ||||
missing_keys.append(required_key) | missing_keys.append(required_key) | ||||
if missing_keys != []: | if missing_keys != []: | ||||
raise ValueError( | raise ValueError( | ||||
"sources structure invalid, missing: %s", ",".join(missing_keys) | "sources structure invalid, missing: %s", ",".join(missing_keys) | ||||
) | ) | ||||
# Only the version 1 is currently supported | # Only the version 1 is currently supported | ||||
if sources["version"] != 1: | version = int(sources["version"]) | ||||
if version != 1: | |||||
raise ValueError( | raise ValueError( | ||||
"The sources structure version '%d' is not supported", sources["version"] | "The sources structure version '%d' is not supported", sources["version"] | ||||
) | ) | ||||
# If a source doesn't contain required attributes, this source is | # If a source doesn't contain required attributes, this source is | ||||
# skipped but others could still be archived. | # skipped but others could still be archived. | ||||
verified_sources = [] | verified_sources = [] | ||||
for source in sources["sources"]: | for source in sources["sources"]: | ||||
Show All 25 Lines |