From 1a59db562258d9a8d00e228ff0ebc718793755c4 Mon Sep 17 00:00:00 2001 From: Tobias Grigo Date: Thu, 20 Aug 2026 12:28:21 +0200 Subject: [PATCH] Fix http error reporting and json metadata handling Raise on unsuccessful HTTP responses during Bandersnatch requests so errors are reported directly instead of being misclassified as stale metadata. Also allow deserialized json list values when rendering python package metadata. --- .../+fixed-error-reporting-and-json-metadata-handling.bugfix | 1 + pulp_python/app/utils.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CHANGES/+fixed-error-reporting-and-json-metadata-handling.bugfix diff --git a/CHANGES/+fixed-error-reporting-and-json-metadata-handling.bugfix b/CHANGES/+fixed-error-reporting-and-json-metadata-handling.bugfix new file mode 100644 index 00000000..66427dbe --- /dev/null +++ b/CHANGES/+fixed-error-reporting-and-json-metadata-handling.bugfix @@ -0,0 +1 @@ +Fixed python syncs masking HTTP errors as stale metadata and handling native json list values in package metadata diff --git a/pulp_python/app/utils.py b/pulp_python/app/utils.py index 8838fa51..f4d06fa4 100644 --- a/pulp_python/app/utils.py +++ b/pulp_python/app/utils.py @@ -462,7 +462,7 @@ def json_to_dict(data): dictionary: of JSON string """ - if isinstance(data, dict): + if isinstance(data, (dict, list)): return data return json.loads(data)