From 1aeeed6972c6f3b451d6f0e6c3ca32c3df6b1a86 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Tue, 5 Dec 2006 20:20:39 +0000 Subject: [PATCH] --- library/pytorrent.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/library/pytorrent.py b/library/pytorrent.py index ee291a3b3..0a2208dd0 100644 --- a/library/pytorrent.py +++ b/library/pytorrent.py @@ -376,7 +376,7 @@ class manager: # Filtering functions def set_file_filter(self, unique_ID, file_filter): - assert(len(file_filter) == self.get_torrent_core_state(unique_ID, True)) + assert(len(file_filter) == self.get_torrent_core_state(unique_ID, True)['num_files']) self.unique_IDs[unique_ID].file_filter = file_filter[:] @@ -388,7 +388,7 @@ class manager: except AttributeError: return None - # Call this when a session starts, to apply existing filters + # Called when a session starts, to apply existing filters def apply_all_file_filters(self): for unique_ID in self.unique_IDs.keys(): try: @@ -396,7 +396,6 @@ class manager: except AttributeError: pass - # Miscellaneous minor functions def set_user_pause(self, unique_ID, new_value): @@ -536,4 +535,3 @@ class manager: ret = -1 return ret -