diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-10-02 15:14:22 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-10-02 15:14:22 +0800 |
commit | dca028c9cb936bf1a3f2de36b903bc2410144abf (patch) | |
tree | 230c4b916502c235c372377fb774086707dd0de7 /fg21sim/configs/manager.py | |
parent | 88ac5bf6ef8836d5b2a8569e2c6466005b783077 (diff) | |
download | fg21sim-dca028c9cb936bf1a3f2de36b903bc2410144abf.tar.bz2 |
configs/manager.py: Refactor "get()" method and remove "set()"
Diffstat (limited to 'fg21sim/configs/manager.py')
-rw-r--r-- | fg21sim/configs/manager.py | 9 |
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): |