equal
deleted
inserted
replaced
368 Or a ConfigValueError if 'misc.dovecot_version' has the wrong |
368 Or a ConfigValueError if 'misc.dovecot_version' has the wrong |
369 format. |
369 format. |
370 """ |
370 """ |
371 # TODO: There are only two settings w/o defaults. |
371 # TODO: There are only two settings w/o defaults. |
372 # So there is no need for cStringIO |
372 # So there is no need for cStringIO |
373 if not self.__chk_cfg(): |
373 if not self._chk_cfg(): |
374 errmsg = StringIO() |
374 errmsg = StringIO() |
375 errmsg.write(_(u'Missing options, which have no default value.\n')) |
375 errmsg.write(_(u'Missing options, which have no default value.\n')) |
376 errmsg.write(_(u'Using configuration file: %s\n') % |
376 errmsg.write(_(u'Using configuration file: %s\n') % |
377 self._cfg_filename) |
377 self._cfg_filename) |
378 for section, options in self.__missing.iteritems(): |
378 for section, options in self.__missing.iteritems(): |
390 def unicode(self, section, option): |
390 def unicode(self, section, option): |
391 """Returns the value of the `option` from `section`, converted |
391 """Returns the value of the `option` from `section`, converted |
392 to Unicode.""" |
392 to Unicode.""" |
393 return get_unicode(self.get(section, option)) |
393 return get_unicode(self.get(section, option)) |
394 |
394 |
395 def __chk_cfg(self): |
395 def _chk_cfg(self): |
396 """Checks all section's options for settings w/o a default |
396 """Checks all section's options for settings w/o a default |
397 value. |
397 value. |
398 |
398 |
399 Returns `True` if everything is fine, else `False`. |
399 Returns `True` if everything is fine, else `False`. |
400 """ |
400 """ |