mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-09 18:14:11 +00:00
add get_config_values method to core to allow for multiple config values to be retrieved
This commit is contained in:
parent
7b243759f3
commit
92574feeb4
@ -531,6 +531,17 @@ class Core(
|
||||
|
||||
return value
|
||||
|
||||
def export_get_config_values(self, keys):
|
||||
"""Get the config values for the entered keys"""
|
||||
config = {}
|
||||
for key in keys:
|
||||
try:
|
||||
config[key] = self.config[key]
|
||||
except KeyError:
|
||||
pass
|
||||
return config
|
||||
|
||||
|
||||
def export_set_config(self, config):
|
||||
"""Set the config with values from dictionary"""
|
||||
# Load all the values into the configuration
|
||||
|
Loading…
x
Reference in New Issue
Block a user