]> git.phdru.name Git - extfs.d.git/blobdiff - torrent
Fix(torrent): Process torrent file as binary
[extfs.d.git] / torrent
diff --git a/torrent b/torrent
index 63632420629529168b7325423f6b2df8413a57e1..550ad72ebf9c1f459e12a5cfa7b0eccf19bb2207 100755 (executable)
--- a/torrent
+++ b/torrent
@@ -265,7 +265,7 @@ def torrent_error(error_str):
 
 def decode_torrent():
     try:
-        torrent_file = open(sys.argv[2], 'r')
+        torrent_file = open(sys.argv[2], 'rb')
         data = torrent_file.read()
         torrent_file.close()
         return decode(data)