Message146624
| Author |
mu_mind |
| Recipients |
RonnyPfannschmidt, alexis, eric.araujo, jens, mikehoy, mu_mind, tarek |
| Date |
2011年10月30日.00:04:40 |
| SpamBayes Score |
6.123416e-08 |
| Marked as misclassified |
No |
| Message-id |
<1319933081.3.0.334751591927.issue11638@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
One way to fix the symptom (maybe not the correct way) would be to edit tarfile._Stream._init_write_gz and change the line that reads
self.__write(self.name + NUL)
to something like
self.__write(self.name.encode('utf-8') + NUL)
tarfile is building up an encoded stream of bytes, and whatever self.name is it needs to be encoded before being inserted into the stream. I'm not positive UTF-8 is right, and maybe it should only convert if isinstance(self.name, unicode). |
|