mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 20:14:13 +00:00
Add ability to run individual set functions
This commit is contained in:
parent
502fa6983e
commit
1091054b38
@ -271,6 +271,17 @@ class Config(object):
|
|||||||
for key, value in self.__set_functions.iteritems():
|
for key, value in self.__set_functions.iteritems():
|
||||||
value(key, self.__config[key])
|
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):
|
def load(self, filename=None):
|
||||||
"""
|
"""
|
||||||
Load a config file
|
Load a config file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user