读取ini格式的配置内容 :param section_name: 需要读取的块名 :param cfg_string: str, 配置字符串 :param cfg_file: str, 配置文件路径 :return: dict, 配置键值对
(self, section_name)
| 33 | self._cfg.read(self._cfg_file, encoding=encoding) |
| 34 | |
| 35 | def read(self, section_name): |
| 36 | """ |
| 37 | 读取ini格式的配置内容 |
| 38 | :param section_name: 需要读取的块名 |
| 39 | :param cfg_string: str, 配置字符串 |
| 40 | :param cfg_file: str, 配置文件路径 |
| 41 | :return: dict, 配置键值对 |
| 42 | """ |
| 43 | rule_params_dict = {} |
| 44 | for key, value in self._cfg.items(section_name): |
| 45 | rule_params_dict[key] = value |
| 46 | return rule_params_dict |
| 47 | |
| 48 | def get_section_names(self): |
| 49 | """ |
no outgoing calls
no test coverage detected