From d0a438e9c4cc9d1b5106735eccce10432ef37574 Mon Sep 17 00:00:00 2001 From: Bela Stoyan Date: Tue, 19 Dec 2023 11:54:09 +0100 Subject: [PATCH] make index.arch and index.platform optional --- binstar_client/inspect_package/conda.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/binstar_client/inspect_package/conda.py b/binstar_client/inspect_package/conda.py index 161d47bb..7743e4f5 100644 --- a/binstar_client/inspect_package/conda.py +++ b/binstar_client/inspect_package/conda.py @@ -101,8 +101,10 @@ def _load(filename, default=None): icon_b64 = data_uri_from(icon_path) subdir = get_subdir(index) - machine = index['arch'] - operatingsystem = os_map.get(index['platform'], index['platform']) + machine = index.get('arch', None) + platform = index.get('platform', None) + + operatingsystem = os_map.get(platform, platform) package_data = { 'name': index.pop('name'),