aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/configs
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-02-27 22:54:58 +0800
committerAaron LI <aly@aaronly.me>2019-02-27 23:57:12 +0800
commita46f36eee2da0c882fec110034dee10d94519116 (patch)
tree10bb1c4e2079722d9bb263a5e6e7f4bd5bde2252 /fg21sim/configs
parent4a1b5ad1a3e1dac17d52a17f43d4cf14a9804f50 (diff)
downloadfg21sim-a46f36eee2da0c882fec110034dee10d94519116.tar.bz2
configs/manager: Add update() method
Diffstat (limited to 'fg21sim/configs')
-rw-r--r--fg21sim/configs/manager.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/fg21sim/configs/manager.py b/fg21sim/configs/manager.py
index 9e0ddbe..76ece70 100644
--- a/fg21sim/configs/manager.py
+++ b/fg21sim/configs/manager.py
@@ -408,6 +408,10 @@ class ConfigManager:
logger.info("Set config: {key}: {val_old} -> {val_new}".format(
key="/".join(key), val_new=val_new, val_old=val_old))
+ def update(self, **kwargs):
+ for key, value in kwargs.items():
+ self.setn(key, value)
+
def __setitem__(self, key, value):
self.setn(key, value)