BUG: pwclient fails with LKML 48263

Mauro Carvalho Chehab mchehab at infradead.org
Fri Sep 18 00:12:14 EST 2009


Em Thu, 17 Sep 2009 14:50:35 +0200
Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> escreveu:

> On 17.09.2009 13:17, Thomas Gleixner wrote:
> > I'm trying to utilize patchwork for my daily workflow and I just
> > discovered a problem with http://patchwork.kernel.org/patch/48263/
> >
> > # pwclient view 48263 | less
> >
> > Traceback (most recent call last):
> >   File "apps/patchwork/bin/pwclient", line 446, in <module>
> >     main()
> >   File "apps/patchwork/bin/pwclient", line 411, in main
> >     print s
> > UnicodeEncodeError: 'ascii' codec can't encode character u'\ufeff' in position 256: ordinal not in range(128)
> >   

I think I've already sent a patch for it. Anyway, Let's sent it back.

-

Fix yet-another issue with pwclient not working with utf-8 chars

Signed-off-by: Mauro Carvalho Chehab <mchehab at redhat.com>

diff --git a/apps/patchwork/bin/pwclient b/apps/patchwork/bin/pwclient
index e25212a..ac67a2b 100755
--- a/apps/patchwork/bin/pwclient
+++ b/apps/patchwork/bin/pwclient
@@ -408,7 +409,7 @@ def main():
 
         s = rpc.patch_get_mbox(patch_id)
         if len(s) > 0:
-            print s
+            print unicode(s).encode("utf-8")
 
     elif action == 'get' or action == 'save':
         try:





Cheers,
Mauro


More information about the Patchwork mailing list