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 000000000..66427dbed --- /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/tasks/sync.py b/pulp_python/app/tasks/sync.py index dd5e38265..971338f62 100644 --- a/pulp_python/app/tasks/sync.py +++ b/pulp_python/app/tasks/sync.py @@ -130,6 +130,7 @@ async def run(self): auth=downloader.auth, proxy=downloader.proxy, proxy_auth=downloader.proxy_auth, + raise_for_status=True, ) deferred_download = self.remote.policy != Remote.IMMEDIATE diff --git a/pulp_python/app/utils.py b/pulp_python/app/utils.py index 9e08c77c6..2d0d56b0a 100644 --- a/pulp_python/app/utils.py +++ b/pulp_python/app/utils.py @@ -441,7 +441,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)