VirtualMailManager/config.py
branchv0.7.x
changeset 658 ad967c4b7fe5
parent 650 429ba58bc302
child 670 f374ef062c94
equal deleted inserted replaced
657:6515e3b88dec 658:ad967c4b7fe5
   356         """Loads the configuration, read only.
   356         """Loads the configuration, read only.
   357 
   357 
   358         Raises a ConfigError if the configuration syntax is
   358         Raises a ConfigError if the configuration syntax is
   359         invalid.
   359         invalid.
   360         """
   360         """
   361         with open(self._cfg_filename, 'r') as self._cfg_file:
   361         with open(self._cfg_filename, 'r', encoding='utf-8') as self._cfg_file:
   362             try:
   362             try:
   363                 self.readfp(self._cfg_file)
   363                 self.readfp(self._cfg_file)
   364             except (MissingSectionHeaderError, ParsingError) as err:
   364             except (MissingSectionHeaderError, ParsingError) as err:
   365                 raise ConfigError(str(err), CONF_ERROR)
   365                 raise ConfigError(str(err), CONF_ERROR)
   366 
   366