summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCalum Lind <calumlind+deluge@gmail.com>2019-05-11 19:02:16 +0100
committerCalum Lind <calumlind+deluge@gmail.com>2019-05-11 19:09:44 +0100
commit653f80eac8593703bda727ca85d955dd1973ca1a (patch)
tree7694a2df674f39103c4914ef2478b857a2c53e85
parent76b89a7943df58da9a3fb904fb130eced403f5a3 (diff)
downloaddeluge-653f80eac8593703bda727ca85d955dd1973ca1a.tar.gz
deluge-653f80eac8593703bda727ca85d955dd1973ca1a.tar.bz2
deluge-653f80eac8593703bda727ca85d955dd1973ca1a.zip
[#3250|Console] Fix errors dispaying magnets with no files
Trying to display the files for magnet that has no metadata and thus no files resulted in `'NoneType' object is not iterable` errors. Only call file prio update method if we have a list of files.
-rw-r--r--deluge/ui/console/modes/torrentdetail.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/deluge/ui/console/modes/torrentdetail.py b/deluge/ui/console/modes/torrentdetail.py
index 7c4984108..d02a0d396 100644
--- a/deluge/ui/console/modes/torrentdetail.py
+++ b/deluge/ui/console/modes/torrentdetail.py
@@ -212,7 +212,7 @@ class TorrentDetail(BaseMode, PopupsHandler):
if self.file_dict[i][6] != prio:
need_prio_update = True
self.file_dict[i][6] = prio
- if need_prio_update:
+ if need_prio_update and self.file_list:
self.__fill_prio(self.file_list)
del state['file_progress']
del state['file_priorities']