Properly shutdown ConfigManager.

This commit is contained in:
Andrew Resch 2007-09-18 04:47:28 +00:00
parent 9370d81444
commit e4ebef6ae3
3 changed files with 12 additions and 2 deletions

View File

@ -38,10 +38,11 @@ class _ConfigManager:
def __init__(self): def __init__(self):
log.debug("ConfigManager started..") log.debug("ConfigManager started..")
self.config_files = {} self.config_files = {}
def __del__(self): def __del__(self):
log.debug("ConfigManager stopping..")
del self.config_files del self.config_files
def get_config(self, config_file, defaults=None): def get_config(self, config_file, defaults=None):
"""Get a reference to the Config object for this filename""" """Get a reference to the Config object for this filename"""
# Create the config object if not already created # Create the config object if not already created

View File

@ -142,6 +142,8 @@ class Core(dbus.service.Object):
del self.torrents del self.torrents
self.plugins.shutdown() self.plugins.shutdown()
del self.plugins del self.plugins
del self.config
del deluge.configmanager
del self.session del self.session
@dbus.service.method(dbus_interface="org.deluge_torrent.Deluge", @dbus.service.method(dbus_interface="org.deluge_torrent.Deluge",

View File

@ -43,6 +43,7 @@ from signals import Signals
from pluginmanager import PluginManager from pluginmanager import PluginManager
from deluge.configmanager import ConfigManager from deluge.configmanager import ConfigManager
from deluge.log import LOG as log from deluge.log import LOG as log
import deluge.configmanager
DEFAULT_PREFS = { DEFAULT_PREFS = {
"interactive_add": False, "interactive_add": False,
@ -93,3 +94,9 @@ class GtkUI:
# Start the gtk main loop # Start the gtk main loop
gtk.main() gtk.main()
# Clean-up
del self.mainwindow
del self.signal_receiver
del self.plugins
del deluge.configmanager