diff --git a/scripts/nvx_tools/release.py b/scripts/nvx_tools/release.py index e5766981..393af036 100644 --- a/scripts/nvx_tools/release.py +++ b/scripts/nvx_tools/release.py @@ -213,6 +213,7 @@ def _latest_release_asset( and asset_pattern.fullmatch(name) is not None and isinstance(asset_url, str) and isinstance(size, int) + and not isinstance(size, bool) ): return _ReleaseAsset(tag, name, asset_url, size) raise ScriptError(f"no GitHub release contains an NVX package for {platform}") diff --git a/scripts/test_nvx_tools.py b/scripts/test_nvx_tools.py index f8f7eeb2..aab6088b 100644 --- a/scripts/test_nvx_tools.py +++ b/scripts/test_nvx_tools.py @@ -7284,6 +7284,11 @@ def test_selects_latest_matching_prerelease_asset(self): "prerelease": True, "tag_name": "v1.2.3-dev.abc123", "assets": [ + { + "name": "nvx-invalid-linux-kvm.tar.gz", + "url": "https://api.example.invalid/invalid", + "size": True, + }, { "name": "nvx-1.2.3-windows-whp.zip", "url": "https://api.example.invalid/windows",