[PATCH][BUG] StringIO mixes poorly with difflib
John A Meinel
john at arbash-meinel.com
Tue Jun 28 23:27:32 BST 2005
difflib likes to return a generator, rather than returning the actual text.
StringIO.writelines() tries to pre-allocate, and makes a "len()" request
on it's argument.
However, a generator has no length.
Basically, the simple fix is to just change diff.py with the attached patch.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: difflib-and-stringio.patch
Type: text/x-patch
Size: 333 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050628/a8a36753/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050628/a8a36753/attachment.pgp
More information about the bazaar
mailing list