[bitbake-devel] [PATCH 1/1] bitbake: cooker: convert type which needs to be marshalled

Christopher Larson clarson at kergoth.com
Tue Nov 29 16:33:29 UTC 2016


On Tue, Nov 29, 2016 at 2:57 AM, Sujith Haridasan <sujith.h at gmail.com>
wrote:

> From: Sujith H <sujith.h at gmail.com>
>
> We assume that the value taken by variable v can be string,
> integer or any type which can be marshalled by xmlrpc. This
> change would help us to convert the non marshallable types
> to string. So that we don't get exception from xmlrpc.
>
> [YOCTO #10740]
>
> Signed-off-by: Sujith H <sujith.h at gmail.com>
> ---
>  bitbake/lib/bb/cooker.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
> index c08af45..1dab450 100644
> --- a/bitbake/lib/bb/cooker.py
> +++ b/bitbake/lib/bb/cooker.py
> @@ -1488,7 +1488,7 @@ class BBCooker:
>                  v = self.data.getVar(k, expand)
>                  if not k.startswith("__") and not isinstance(v,
> bb.data_smart.DataSmart):
>                      dump[k] = {
> -    'v' : v ,
> +    'v' : repr(v) ,
>      'history' : self.data.varhistory.variable(k),
>                      }
>                      for d in flaglist:
>

I think str(v) would be more appropriate here. We need it to be a string,
not necessarily a more complete representation of the object.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/bitbake-devel/attachments/20161129/f47dc381/attachment-0002.html>


More information about the bitbake-devel mailing list