mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-09 09:58:39 +00:00
Fix bdecoding some torrent files
This commit is contained in:
parent
14006f83b5
commit
7a645486ab
2 changed files with 5 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Deluge 1.1.1 - (In Development)
|
||||||
|
Misc:
|
||||||
|
* Fix bdecoding some torrent files
|
||||||
|
|
||||||
Deluge 1.1.0 - "Time gas!" (10 January 2009)
|
Deluge 1.1.0 - "Time gas!" (10 January 2009)
|
||||||
Core:
|
Core:
|
||||||
* Fix issue in get_tracker_host when the torrent has no tracker
|
* Fix issue in get_tracker_host when the torrent has no tracker
|
||||||
|
|
|
@ -65,8 +65,7 @@ def bdecode(x):
|
||||||
r, l = decode_func[x[0]](x, 0)
|
r, l = decode_func[x[0]](x, 0)
|
||||||
except (IndexError, KeyError, ValueError):
|
except (IndexError, KeyError, ValueError):
|
||||||
raise Exception("not a valid bencoded string")
|
raise Exception("not a valid bencoded string")
|
||||||
if l != len(x):
|
|
||||||
raise Exception("invalid bencoded value (data after valid prefix)")
|
|
||||||
return r
|
return r
|
||||||
|
|
||||||
from types import StringType, IntType, LongType, DictType, ListType, TupleType
|
from types import StringType, IntType, LongType, DictType, ListType, TupleType
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue