Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. #
def config_directory(self):
del self.config_files
""" Sets the config directory.
:param directory: str, the directory where the config info should be
:returns bool: True if successfully changed directory, False if not """
return False
# Try to create the config folder if it doesn't exist try: os.makedirs(directory) except OSError as ex: log.error("Unable to make config directory: %s", ex) return False log.error("Config directory needs to be a directory!") return False
# Reset the config_files so we don't get config from old config folder # XXX: Probably should have it go through the config_files dict and try # to reload based on the new config directory
"""Closes a config file.""" try: del self.config_files[config] except KeyError: pass
"""Saves all the configs to disk.""" # We need to return True to keep the timer active
"""Get a reference to the Config object for this filename""" # Create the config object if not already created
# Singleton functions
"""Sets the config directory, else just uses default"""
else:
return _configmanager.close(config) |