Hi! The attached patch (a simple one-liner) fix unicode issues when trying to make torrents.
Regards, -- Jérémy
#! /bin/sh /usr/share/dpatch/dpatch-run ## 14_fix_unicode_in_makemetafile.py.dpatch by Jérémy Bobbio <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Don't try to decode a string which is already unicode! @DPATCH@ diff -urNad bittornado-0.3.15~/BitTornado/BT1/makemetafile.py bittornado-0.3.15/BitTornado/BT1/makemetafile.py --- bittornado-0.3.15~/BitTornado/BT1/makemetafile.py 2005-01-04 03:49:28.000000000 +0100 +++ bittornado-0.3.15/BitTornado/BT1/makemetafile.py 2006-10-09 00:22:44.942933750 +0200 @@ -145,7 +145,8 @@ def uniconvert(s, e): try: - s = unicode(s,e) + if s.__class__.__name__ != 'unicode': + s = unicode(s,e) except UnicodeError: raise UnicodeError('bad filename: '+s) return s.encode('utf-8')
signature.asc
Description: Digital signature