mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-04 07:33:31 +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
@ -530,6 +530,17 @@ class Core(
|
||||
return None
|
||||
|
||||
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"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user