Fix saving torrent state on fresh configs

Do not try to call doIteration() on the reactor if it has already stopped
This commit is contained in:
Andrew Resch 2009-10-11 18:46:35 +00:00
parent ef5739a6a8
commit 7d67da4371
3 changed files with 9 additions and 1 deletions

View file

@ -2,7 +2,11 @@
==== GtkUI ====
* Fix path errors when adding torrents externally in Windows
* Fix localclient authentication by stripping the lines read from the auth file
* Do not try to call doIteration() on the reactor if it has already stopped
==== Core ====
* Fix saving torrent state on fresh configs
==== Misc ====
* Add man pages for deluge-console and deluge-gtk

View file

@ -132,6 +132,10 @@ class TorrentManager(component.Component):
# Get the core config
self.config = ConfigManager("core.conf")
# Make sure the state folder has been created
if not os.path.exists(os.path.join(get_config_dir(), "state")):
os.makedirs(os.path.join(get_config_dir(), "state"))
# Create the torrents dict { torrent_id: Torrent }
self.torrents = {}

View file

@ -233,7 +233,7 @@ class GtkUI(object):
# Process any pending gtk events since the mainloop has been quit
if not deluge.common.windows_check():
while gtk.events_pending():
while gtk.events_pending() and reactor.running:
reactor.doIteration(0)
# Shutdown all components