From a037e785411431e2f82d36e570e70a75abe1dd48 Mon Sep 17 00:00:00 2001 From: Frantisek Lachman Date: Fri, 13 Dec 2019 10:54:13 +0100 Subject: [PATCH] Simplify json imports Signed-off-by: Frantisek Lachman --- packit_service/worker/copr_build.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 = (