From 400e47aa807770baee84e499c5e2f0b7cb30e62f Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Fri, 4 Jul 2008 19:37:21 +0000 Subject: [PATCH] Fix #319 do not crash when changing file priorities --- deluge/core/torrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index bd5423673..2253e176d 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -185,7 +185,7 @@ class Torrent: def set_file_priorities(self, file_priorities): log.debug("setting %s's file priorities: %s", self.torrent_id, file_priorities) - if len(file_priorities) != self.torrent_info.num_files(): + if len(file_priorities) != len(self.files): log.debug("file_priorities len != num_files") return