#! /bin/sh /usr/share/dpatch/dpatch-run ## 14_fix_unicode_in_makemetafile.py.dpatch by Jérémy Bobbio ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Don't try to decode a string which is already unicode! @DPATCH@ --- bittornado.orig/BitTornado/BT1/makemetafile.py +++ bittornado/BitTornado/BT1/makemetafile.py @@ -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')