From 8e4c46d67eff0b0a1898d7262df2ebf62a48a7c4 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Sat, 10 Feb 2007 23:33:06 +0000 Subject: [PATCH] bool was not a real type in Python <2.3 and had to be marshalled as a custom type in xmlrpclib. Make sure that bools serialize consistently. --- source/BootAPI.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/BootAPI.py b/source/BootAPI.py index f3092fb..c0d0c3b 100644 --- a/source/BootAPI.py +++ b/source/BootAPI.py @@ -64,6 +64,14 @@ def serialize_params( call_params ): values += serialize_params(param) elif isinstance(param,dict): values += serialize_params(param.values()) + elif isinstance(param,xmlrpclib.Boolean): + # bool was not a real type in Python <2.3 and had to be + # marshalled as a custom type in xmlrpclib. Make sure that + # bools serialize consistently. + if param: + values.append("True") + else: + values.append("False") else: values.append(unicode(param)) -- 2.43.0