summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-05-23 13:01:47 +0200
committerJan Cholasta <jcholast@redhat.com>2016-05-25 16:06:26 +0200
commitc37aba291f60f01a2aef5ebbff7f4dfb23d9bb67 (patch)
tree19a90073ad60cd84c6c9c0660884a4ad3d62dc5e
parentdea924ac8a04c923d96e04c4c40e253ae1ee857c (diff)
downloadfreeipa-c37aba291f60f01a2aef5ebbff7f4dfb23d9bb67.tar.gz
freeipa-c37aba291f60f01a2aef5ebbff7f4dfb23d9bb67.tar.xz
freeipa-c37aba291f60f01a2aef5ebbff7f4dfb23d9bb67.zip
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 <dkupka@redhat.com>
-rw-r--r--ipalib/rpc.py2
1 files changed, 1 insertions, 1 deletions
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(