diff options
-rw-r--r-- | fg21sim/configs/manager.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fg21sim/configs/manager.py b/fg21sim/configs/manager.py index 4143a8f..7912e1d 100644 --- a/fg21sim/configs/manager.py +++ b/fg21sim/configs/manager.py @@ -233,7 +233,8 @@ class ConfigManager: logger.info("Loaded user config: {0}".format(self.userconfig)) def reset(self): - """Reset the current configurations to the copy of defaults from + """ + Reset the current configurations to the copy of defaults from the specifications. NOTE: Also reset ``self.userconfig`` to ``None``. @@ -423,6 +424,12 @@ class ConfigManager: logger.info("Set config: {key}: {val_new} <- {val_old}".format( key="/".join(key), val_new=val_new, val_old=val_old)) + def __getitem__(self, key): + return self.getn(key=key) + + def __setitem__(self, key, value): + self.setn(key=key, value=value) + def get_path(self, key): """ Return the absolute path of the file/directory specified by the |