From: Mark Huang Date: Sat, 10 Feb 2007 23:33:06 +0000 (+0000) Subject: bool was not a real type in Python <2.3 and had to be marshalled as a X-Git-Tag: bootmanager-3.2-2~42 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;ds=sidebyside;h=8e4c46d67eff0b0a1898d7262df2ebf62a48a7c4;p=bootmanager.git 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. --- 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))