Bug 1764659 - Lint fix. r=fix. CLOSED TREE

This commit is contained in:
Butkovits Atila 2022-04-27 23:30:54 +03:00
parent d653e19400
commit 0755140382

View File

@ -493,18 +493,22 @@ def _schema_1_additional(filename, manifest, require_license_file=True):
# because the license is required to be specified in the Cargo.toml file
if require_license_file and "origin" in manifest:
files = [f.lower() for f in os.listdir(vendor_directory)]
if not (
"license-file" in manifest["origin"]
and manifest["origin"]["license-file"].lower() in files
) and not (
"license" in files
or "license.txt" in files
or "license.rst" in files
or "license.html" in files
or "license.md" in files
) and not (
"vendoring" in manifest and
manifest["vendoring"].get("flavor", "regular") == "rust"
if (
not (
"license-file" in manifest["origin"]
and manifest["origin"]["license-file"].lower() in files
)
and not (
"license" in files
or "license.txt" in files
or "license.rst" in files
or "license.html" in files
or "license.md" in files
)
and not (
"vendoring" in manifest
and manifest["vendoring"].get("flavor", "regular") == "rust"
)
):
license = manifest["origin"]["license"]
if isinstance(license, list):