summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2016-11-30 11:54:59 +0000
committerCalum Lind <calumlind+deluge@gmail.com>2016-11-30 11:54:59 +0000
commit739537f860892e2f526e8416ae53ab08ff9fc47b (patch)
treef4c5a6501f1c7addb5dead36dac9880db9226d48
parentdf88c82265f7b39d4d4087588f3dc58a566c8bf8 (diff)
downloaddeluge-739537f860892e2f526e8416ae53ab08ff9fc47b.tar.gz
deluge-739537f860892e2f526e8416ae53ab08ff9fc47b.tar.bz2
deluge-739537f860892e2f526e8416ae53ab08ff9fc47b.zip
[#2942] Catch file_progress IndexError when checking a torrent
-rw-r--r--deluge/core/torrent.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py
index 95b380d8b..feef72873 100644
--- a/deluge/core/torrent.py
+++ b/deluge/core/torrent.py
@@ -592,6 +592,8 @@ class Torrent(object):
ret.append(float(file_progress[i]) / float(f["size"]))
except ZeroDivisionError:
ret.append(0.0)
+ except IndexError:
+ return []
return ret