]> git.phdru.name Git - extfs.d.git/blobdiff - torrent
Feat(torrent): Set default encoding to 'ascii'
[extfs.d.git] / torrent
diff --git a/torrent b/torrent
index ba725c965aed4ac000d185a2ba481f19066e59b9..bd5ff13f7db394d4b77329a278afed1f2bbd5ccb 100755 (executable)
--- a/torrent
+++ b/torrent
@@ -317,11 +317,11 @@ def decode_torrent():
             encoding = encoding.decode('ascii')
         elif codepage:
             encoding = codepage.decode('ascii')
-
-    if PY3 and encoding:
+        else:
+            encoding = 'ascii'
         return decode_dict(torrent, encoding)
-    else:
-        return torrent
+
+    return torrent
 
 
 def decode_datetime_asc(dt):