aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/configs
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-02 15:14:22 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-02 15:14:22 +0800
commitdca028c9cb936bf1a3f2de36b903bc2410144abf (patch)
tree230c4b916502c235c372377fb774086707dd0de7 /fg21sim/configs
parent88ac5bf6ef8836d5b2a8569e2c6466005b783077 (diff)
downloadfg21sim-dca028c9cb936bf1a3f2de36b903bc2410144abf.tar.bz2
configs/manager.py: Refactor "get()" method and remove "set()"
Diffstat (limited to 'fg21sim/configs')
-rw-r--r--fg21sim/configs/manager.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/fg21sim/configs/manager.py b/fg21sim/configs/manager.py
index 513878f..eabff00 100644
--- a/fg21sim/configs/manager.py
+++ b/fg21sim/configs/manager.py
@@ -91,14 +91,7 @@ class ConfigManager:
def get(self, key, fallback=None):
"""Get config value by key."""
- if key in self._config:
- value = self._config[key]
- else:
- value = fallback
- return value
-
- def set(self, key, value):
- self._config[key] = value
+ return self._config.get(key, fallback)
@property
def logging(self):