hopefully fix segfault

This commit is contained in:
Marcos Pinto 2007-10-23 22:02:15 +00:00
parent 74e5e49ee1
commit f436cbff64
1 changed files with 12 additions and 12 deletions

View File

@ -943,6 +943,18 @@ window, please enter your password"))
self.load_tabs_order() self.load_tabs_order()
#now we load blocklist plugin separately since it takes much longer #now we load blocklist plugin separately since it takes much longer
enable_plugins = self.config.get('enabled_plugins').split(':') enable_plugins = self.config.get('enabled_plugins').split(':')
for torrent in self.manager.get_queue():
unique_id = self.manager.get_torrent_unique_id(torrent)
try:
if self.manager.unique_IDs[unique_id].trackers:
self.manager.replace_trackers(unique_id, \
self.manager.unique_IDs[unique_id].trackers)
if self.manager.unique_IDs[unique_id].uploaded_memory:
self.manager.unique_IDs[unique_id].initial_uploaded_memory \
= self.manager.unique_IDs[unique_id].uploaded_memory
except AttributeError:
pass
if "Blocklist Importer" in enable_plugins: if "Blocklist Importer" in enable_plugins:
try: try:
self.plugins.enable_plugin("Blocklist Importer") self.plugins.enable_plugin("Blocklist Importer")
@ -957,18 +969,6 @@ window, please enter your password"))
except KeyboardInterrupt: except KeyboardInterrupt:
self.manager.quit() self.manager.quit()
for torrent in self.manager.get_queue():
unique_id = self.manager.get_torrent_unique_id(torrent)
try:
if self.manager.unique_IDs[unique_id].trackers:
self.manager.replace_trackers(unique_id, \
self.manager.unique_IDs[unique_id].trackers)
if self.manager.unique_IDs[unique_id].uploaded_memory:
self.manager.unique_IDs[unique_id].initial_uploaded_memory \
= self.manager.unique_IDs[unique_id].uploaded_memory
except AttributeError:
pass
def load_plugins(self): def load_plugins(self):
enable_plugins = self.config.get('enabled_plugins').split(':') enable_plugins = self.config.get('enabled_plugins').split(':')
for plugin in enable_plugins: for plugin in enable_plugins: