From c37aba291f60f01a2aef5ebbff7f4dfb23d9bb67 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 23 May 2016 13:01:47 +0200 Subject: [PATCH] rpc: do not crash when unable to parse JSON When unable to parse JSON response from the server, properly raise JSONError not to cause a crash. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka --- ipalib/rpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipalib/rpc.py b/ipalib/rpc.py index be1ae6306..55b8abb8d 100644 --- a/ipalib/rpc.py +++ b/ipalib/rpc.py @@ -1078,7 +1078,7 @@ class JSONServerProxy(object): try: response = json_decode_binary(json.loads(response.decode('ascii'))) except ValueError as e: - raise JSONError(str(e)) + raise JSONError(error=str(e)) if self.__verbose >= 2: root_logger.info(