diff options
Diffstat (limited to 'utils/tuning/libtuning/parsers/yaml_parser.py')
-rw-r--r-- | utils/tuning/libtuning/parsers/yaml_parser.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/tuning/libtuning/parsers/yaml_parser.py b/utils/tuning/libtuning/parsers/yaml_parser.py index 5c1673a5..1fa6b7a8 100644 --- a/utils/tuning/libtuning/parsers/yaml_parser.py +++ b/utils/tuning/libtuning/parsers/yaml_parser.py @@ -2,16 +2,19 @@ # # Copyright (C) 2022, Paul Elder <paul.elder@ideasonboard.com> # -# yaml_parser.py - Parser for YAML format config file +# Parser for YAML format config file from .parser import Parser +import yaml class YamlParser(Parser): def __init__(self): super().__init__() - # \todo Implement this (it's fine for now as we don't need a config for - # rkisp1 LSC, which is the only user of this so far) def parse(self, config_file: str, modules: list) -> (dict, list): - return {}, [] + # Dummy implementation that just reads the file + with open(config_file, 'r') as f: + config = yaml.safe_load(f) + + return config, [] |