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
@ -530,6 +530,17 @@ class Core(
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
return value
|
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):
|
def export_set_config(self, config):
|
||||||
"""Set the config with values from dictionary"""
|
"""Set the config with values from dictionary"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user