| Conditions | 3 |
| Total Lines | 11 |
| Code Lines | 11 |
| Lines | 11 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | """Configuration file handling""" |
||
| 16 | def __init__(self, filename): |
||
| 17 | self._config = configparser.ConfigParser() |
||
| 18 | self._config.optionxform = annif.util.identity |
||
| 19 | with open(filename, encoding='utf-8-sig') as projf: |
||
| 20 | try: |
||
| 21 | logger.debug( |
||
| 22 | f"Reading configuration file {filename} in CFG format") |
||
| 23 | self._config.read_file(projf) |
||
| 24 | except (configparser.DuplicateOptionError, |
||
| 25 | configparser.DuplicateSectionError) as err: |
||
| 26 | raise ConfigurationException(err) |
||
| 27 | |||
| 54 |