mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-06 08:33:56 +00:00
Fix crash when trying to add a bad .torrent.
This commit is contained in:
parent
5a175587f4
commit
aa932b56a7
@ -141,7 +141,11 @@ class TorrentManager(component.Component):
|
||||
# joined.
|
||||
if type(filedump) is not str:
|
||||
filedump = "".join(chr(b) for b in filedump)
|
||||
filedump = lt.bdecode(filedump)
|
||||
try:
|
||||
filedump = lt.bdecode(filedump)
|
||||
except RuntimeError, e:
|
||||
log.warn("Unable to decode torrent file: %s", e)
|
||||
return None
|
||||
else:
|
||||
# Get the data from the file
|
||||
filedump = self.load_torrent(filename)
|
||||
|
Loading…
x
Reference in New Issue
Block a user