Skip to content

Commit b4c5d24

Browse files
committed
Fix conditions for bzl package versions
Signed-off-by: Adrian Braemer <adrian.braemer@tngtech.com>
1 parent e830934 commit b4c5d24

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

src/packagedcode/build.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,12 @@ def parse(cls, location, package_only=True):
375375
)
376376

377377
if (
378-
'upstream_type'
379-
and 'name'
380-
and 'version'
381-
and 'licenses'
382-
and 'upstream_address'
383-
in metadata_fields
378+
'upstream_type' in metadata_fields
379+
and 'name' in metadata_fields
380+
and 'version' in metadata_fields
381+
and 'licenses' in metadata_fields
382+
and 'upstream_address' in metadata_fields
383+
384384
):
385385
# TODO: Create function that determines package type from download URL,
386386
# then create a package of that package type from the metadata info
@@ -397,16 +397,15 @@ def parse(cls, location, package_only=True):
397397
yield models.PackageData.from_data(package_data, package_only=True)
398398

399399
if (
400-
'package_type'
401-
and 'name'
402-
and 'version'
403-
and 'license_expression'
404-
and 'homepage_url'
405-
and 'download_url'
406-
and 'vcs_url'
407-
and 'download_archive_sha1'
408-
and 'vcs_commit_hash'
409-
in metadata_fields
400+
'package_type' in metadata_fields
401+
and 'name' in metadata_fields
402+
and 'version' in metadata_fields
403+
and 'license_expression' in metadata_fields
404+
and 'homepage_url' in metadata_fields
405+
and 'download_url' in metadata_fields
406+
and 'vcs_url' in metadata_fields
407+
and 'download_archive_sha1' in metadata_fields
408+
and 'vcs_commit_hash' in metadata_fields
410409
):
411410
package_data = dict(
412411
datasource_id=cls.datasource_id,

0 commit comments

Comments
 (0)