On Tuesday 30 March 2010 13:45:42 Sylvain Thénault wrote:
> On 30 mars 14:35, Alexander Artemenko wrote:
> > Hi,
> >
> > On Tue, Mar 30, 2010 at 1:20 PM, Emile Anclin 
<emile.anc...@logilab.fr> wrote:
> > > +                decode = stream.readline().decode
> > > +                line_generator = lambda: decode(encoding)
> > >
> > > instead of:
> > >
> > > +                 line_generator = lambda:
> > > stream.readline().decode(encoding)
> > >
> > >
> > > Can somebody explain me what happened ?
> > >
> > > Anyhow, Appended my new patch (we use func_noerror_* if we don't
> > > want the message triggered)
> >
> > No, this is not ok, because decode will always return first line.
>
> yup.
>
> Using:
>
>    lambda: stream.readline().decode(encoding, 'replace')
>
> should do the trick.

Ok, patch applied. Thanks a lot Alexander Artemenko!


-- 

Emile Anclin <emile.anc...@logilab.fr>
http://www.logilab.fr/   http://www.logilab.org/ 
Informatique scientifique & et gestion de connaissances
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to