Skip to content

Commit

Permalink
Don't re-bread metainfos in PY2
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox committed Jul 24, 2018
1 parent d814a44 commit 7f1766d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyrocore/util/metafile.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ def listing(self, masked=True):
bad_encodings = []
bad_fields = []
if six.PY2: #PY3 knows it's data
metainfo, bad_encodings, bad_fields = sanitize(bencode.bread(metainfo), diagnostics=True)
metainfo, bad_encodings, bad_fields = sanitize(metainfo, diagnostics=True)
announce = metainfo['announce']
info = metainfo['info']
infohash = hashlib.sha1(bencode.bencode(info))
Expand Down

0 comments on commit 7f1766d

Please sign in to comment.