From 8306e0e44e973ef710ee143338460a1458bd3c66 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Fri, 16 Jul 2010 19:20:04 +0200 Subject: [PATCH] RAPI client: Encode empty body to JSON If the body consists of an empty dict, it should also be encoded. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/rapi/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rapi/client.py b/lib/rapi/client.py index 5423576c6..483f7289a 100644 --- a/lib/rapi/client.py +++ b/lib/rapi/client.py @@ -351,7 +351,7 @@ class GanetiRapiClient(object): curl = self._curl - if content: + if content is not None: encoded_content = self._json_encoder.encode(content) else: encoded_content = "" -- GitLab