Commit fad50141 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

luxi: Use serializer module instead of simplejson

Reviewed-by: iustinp
parent 071448fb
......@@ -36,6 +36,7 @@ import time
import errno
from ganeti import opcodes
from ganeti import serializer
from ganeti import constants
......@@ -265,9 +266,9 @@ class Client(object):
"""
msg = {KEY_REQUEST: request, KEY_DATA: data}
result = self.transport.Call(simplejson.dumps(msg))
result = self.transport.Call(serializer.DumpJson(msg, indent=False))
try:
data = simplejson.loads(result)
data = serializer.LoadJson(result)
except Exception, err:
raise ProtocolError("Error while deserializing response: %s" % str(err))
if (not isinstance(data, dict) or
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment