From c103d7ae8f9eeb2b2c833fba58f7fcd855230680 Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Wed, 23 Sep 2009 15:56:33 +0100
Subject: [PATCH] Unpack the confd reply as an object, from the dict

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 lib/confd/client.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/confd/client.py b/lib/confd/client.py
index 7e7253588..53d16735b 100644
--- a/lib/confd/client.py
+++ b/lib/confd/client.py
@@ -112,7 +112,8 @@ class ConfdClient:
 
   def _UnpackReply(self, payload):
     in_payload = confd.UnpackMagic(payload)
-    (answer, salt) = serializer.LoadSignedJson(in_payload, self._hmac_key)
+    (dict_answer, salt) = serializer.LoadSignedJson(in_payload, self._hmac_key)
+    answer = objects.ConfdReply.FromDict(dict_answer)
     return answer, salt
 
   def ExpireRequests(self):
-- 
GitLab