From 7c28c5755b6a6f28d829ef93633529b7641c1d22 Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Wed, 12 Nov 2008 12:50:53 +0000
Subject: [PATCH] ganeti.rpc: Convert to ganeti.serializer

This is one of the last places where the simplejson module is
used directly.

Reviewed-by: iustinp
---
 lib/rpc.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/rpc.py b/lib/rpc.py
index 20325030a..3ed86c361 100644
--- a/lib/rpc.py
+++ b/lib/rpc.py
@@ -35,11 +35,10 @@ import socket
 import httplib
 import logging
 
-import simplejson
-
 from ganeti import utils
 from ganeti import objects
 from ganeti import http
+from ganeti import serializer
 
 
 class Client:
@@ -57,7 +56,7 @@ class Client:
   def __init__(self, procedure, args):
     self.procedure = procedure
     self.args = args
-    self.body = simplejson.dumps(args)
+    self.body = serializer.DumpJson(args, indent=False)
 
     self.port = utils.GetNodeDaemonPort()
     self.nodepw = utils.GetNodeDaemonPassword()
@@ -115,7 +114,7 @@ class Client:
 
     for name, req in self.nc.iteritems():
       if req.success and req.resp_status == http.HTTP_OK:
-        results[name] = simplejson.loads(req.resp_body)
+        results[name] = serializer.LoadJson(req.resp_body)
         continue
 
       if req.error:
-- 
GitLab