diff --git a/packit_service/worker/copr_build.py b/packit_service/worker/copr_build.py index 1105c5f99..013038927 100644 --- a/packit_service/worker/copr_build.py +++ b/packit_service/worker/copr_build.py @@ -21,7 +21,6 @@ # SOFTWARE. import json import logging -from json import JSONDecodeError from typing import Union, List, Optional from kubernetes.client.rest import ApiException @@ -351,7 +350,7 @@ def _process_openshift_error(self, ex: ApiException): json_content = json.loads(ex.body) formatted_json = json.dumps(json_content, indent=2) error_message += f"HTTP response body:\n{formatted_json}\n" - except JSONDecodeError: + except json.JSONDecodeError: error_message += f"HTTP response body: {ex.body}\n" msg = (