[PATCH] Manually encode utf-8 patch in testcase

Dirk Wallenstein halsmit at t-online.de
Sat Feb 12 21:50:38 EST 2011


On Fri, Feb 11, 2011 at 10:41:54AM +0100, Dirk Wallenstein wrote:
> On Fri, Feb 11, 2011 at 07:57:26AM +0800, Jeremy Kerr wrote:
> > Dirk,
> > 
> > > Otherwise there will be a UnicodeDecodeError.
> > 
> > Where are you getting this UnicodeDecodeError? With 7fd7d0bbe reverted, I see 
> > all the testcases pass.
> 
> Hm, maybe this is a Python bug (Python-2.6.5).  Seemed a bit strange
> anyway as the doc explicitly allows to pass in unicode.  I get a couple
> of these (all errors attached):
> 
> ======================================================================
> ERROR: testCommentContent (patchwork.tests.patchparser.UTF8InlinePatchTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/srv/patchwork/apps/patchwork/tests/patchparser.py", line 85, in setUp
>     (self.patch, self.comment) = find_content(self.project, email)
>   File "/srv/patchwork/apps/patchwork/bin/parsemail.py", line 166, in find_content
>     payload = unicode(payload, charset)
> UnicodeDecodeError: 'utf8' codec can't decode bytes in position 146-148: invalid data
> 
> ======================================================================

Yap, gone with Python-2.6.6

-- 
Greetings,
Dirk


More information about the Patchwork mailing list