[Reportbug-maint] Bug#606171: reportbug crashing on non-ascii characters
mpg at elzevir.fr
Thu Jan 6 00:37:48 UTC 2011
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
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...
Size: 696 bytes
Desc: not available
More information about the Reportbug-maint