[Reportbug-maint] Bug#606171: reportbug crashing on non-ascii characters
Manuel Pégourié-Gonnard
mpg at elzevir.fr
Thu Jan 6 00:37:48 UTC 2011
Hi Sandro,
Le 02/01/2011 16:37, Sandro Tosi a écrit :
> Well, I'm not exactly sure why this is happening (it should have not)
> but could you try to apply the attached patch to /usr/bin/reportbug
> and try to replicate the problem?
>
I tried with the patch applied, and unfortunately it doesn't prevent the crash.
The final error message now ends with:
File "/usr/bin/reportbug", line 1733, in user_interface
conftext = conftext + u'%s %s\n' % (f, confinfo[f].encode('utf-8'))
AttributeError: 'exceptions.IOError' object has no attribute 'encode'
Which actually helped me understand the problem a bit better: the origin of the
offending 0xc3 byte is actually the error string "Permission non accordée"
("access denied" message with LANG=fr_FR.utf8) that occurs since the user runing
reportbug doesn't have access to one of munin-node configuration files.
Attached is a patch that works for me. I don't know Python, so I hope it's
correct. The way the charset is guessed is copied from line 504 of
/usr/bin/reportbug.
hth,
Manuel.
PS: the patch is against a file from python-reportbug, so maybe the bug should
be moved to this package. Up to you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 606171-2.diff
Type: text/x-patch
Size: 696 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reportbug-maint/attachments/20110106/204777e1/attachment-0001.bin>
More information about the Reportbug-maint
mailing list