mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
Add ability to run individual set functions
This commit is contained in:
parent
502fa6983e
commit
1091054b38
1 changed files with 11 additions and 0 deletions
|
@ -271,6 +271,17 @@ class Config(object):
|
|||
for key, value in self.__set_functions.iteritems():
|
||||
value(key, self.__config[key])
|
||||
|
||||
def apply_set_functions(self, key):
|
||||
"""
|
||||
Calls set functions for `:param:key`.
|
||||
|
||||
:param key: str, the config key
|
||||
|
||||
"""
|
||||
log.debug("Calling set functions for key %s..", key)
|
||||
if key in self.__set_functions:
|
||||
self.__set_functions[key](key, self.__config[key])
|
||||
|
||||
def load(self, filename=None):
|
||||
"""
|
||||
Load a config file
|
||||
|
|
Loading…
Add table
Reference in a new issue