[MERGE] Use a list not a tuple for chunks returned from FullTextContentFactory objects, because otherwise code tries to assign to tuples.
Robert Collins
robertc at robertcollins.net
Tue Feb 3 20:18:09 GMT 2009
On Tue, 2009-02-03 at 09:55 -0600, John Arbash Meinel wrote:
>
> I'm pretty sure that you should not be mutating the return of
> get_bytes_as('chunks') directly. Instead you should do:
>
> lines = osutils.chunks_to_lines(get_bytes_as('chunks'))
>
> And then you can mutate 'lines'. Otherwise 'chunks' can be:
>
> [fulltext]
>
> or
>
> [line1, line2, line3]
>
> Which are both valid representation of the same text in 'chunked'
> form.
>
>
> Anyway, I don't have a strict problem with the change, but I think it
> points out a bug elsewhere, not a bug in the FulltextContentFactory
> code.
when the chunks are lines, chunks_to_lines returns its input.
So chunks_to_lines(('foo\n',)) -> ('foo\n',)
-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090204/ec0f4295/attachment.pgp
More information about the bazaar
mailing list