[sugar] Published values and '='

Ian Bicking ianb
Fri Oct 13 12:01:47 EDT 2006


Marco Pesenti Gritti wrote:
> Hi,
> 
> it looks like I can't use the '=' character in the service published 
> values.
> 
>  File 
> "/home/marco/sugar-jhbuild/source/sugar/services/presence/PresenceService.py", 
> line 506, in _service_resolved_cb
>    props = _txt_to_dict(txt)
>  File 
> "/home/marco/sugar-jhbuild/source/sugar/services/presence/PresenceService.py", 
> line 101, in _txt_to_dict
>    (key, value) = item.split('=')

Shouldn't that just be:

key, value = item.split('=', 1)

?  (the second argument makes it split at most once on '=')

-- 
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org


More information about the Sugar-devel mailing list