]> git.phdru.name Git - mc/extfs.d.git/commitdiff
Fix(torrent): `encoding` is integer like `866` master
authorOleg Broytman <phd@phdru.name>
Sun, 6 Apr 2025 12:08:47 +0000 (15:08 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 6 Apr 2025 12:08:47 +0000 (15:08 +0300)
Not a string like `'cp866'`.

torrent

diff --git a/torrent b/torrent
index 396a61e1364fcdf9204da959b14f41b37ec883dd..a1f5d4b533157391ce684d2485ed1f22d781fc7f 100755 (executable)
--- a/torrent
+++ b/torrent
@@ -396,7 +396,7 @@ def decode_torrent():
         if encoding:
             encoding = encoding.decode('ascii')
         elif codepage:
-            encoding = codepage.decode('ascii')
+            encoding = str(codepage)
         else:
             for encoding in ('ascii', 'utf-8', default_encoding):
                 try: