[Core] Fix saving torrent info metadata

* Unicode dict entry should be bytes.
This commit is contained in:
Calum Lind 2017-03-21 12:02:25 +00:00
parent e5e49f68ba
commit 19fdd2f88c

View File

@ -1193,7 +1193,7 @@ class Torrent(object):
self.set_file_priorities([]) self.set_file_priorities([])
if filedump is None: if filedump is None:
metadata = lt.bdecode(self.torrent_info.metadata()) metadata = lt.bdecode(self.torrent_info.metadata())
torrent_file = {'info': metadata} torrent_file = {b'info': metadata}
filedump = lt.bencode(torrent_file) filedump = lt.bencode(torrent_file)
write_file(filepath, filedump) write_file(filepath, filedump)