VirtualMailManager/Config.py
changeset 94 0d303d15549e
parent 86 e43e4e7e9ec0
child 95 fc008eb12186
equal deleted inserted replaced
93:bc41dfcef0ad 94:0d303d15549e
    94         self.__cfgFile.close()
    94         self.__cfgFile.close()
    95 
    95 
    96     def check(self):
    96     def check(self):
    97         if not self.__chkSections():
    97         if not self.__chkSections():
    98             errmsg = StringIO()
    98             errmsg = StringIO()
       
    99             errmsg.write(_("Using configuration file: %s\n") %\
       
   100                     self.__cfgFileName)
    99             for k,v in self.__missing.items():
   101             for k,v in self.__missing.items():
   100                 if v[0] is True:
   102                 if v[0] is True:
   101                     errmsg.write(_(u"missing section: %s\n") % k)
   103                     errmsg.write(_(u"missing section: %s\n") % k)
   102                 else:
   104                 else:
   103                     errmsg.write(_(u"missing options in section %s:\n") % k)
   105                     errmsg.write(_(u"missing options in section %s:\n") % k)
   127             if not self.getboolean('config', 'done'):
   129             if not self.getboolean('config', 'done'):
   128                 self.__changes = True
   130                 self.__changes = True
   129         except ValueError:
   131         except ValueError:
   130             self.set('config', 'done', 'False')
   132             self.set('config', 'done', 'False')
   131             self.__changes = True
   133             self.__changes = True
       
   134         print _(u"Using configuration file: %s\n" % self.__cfgFileName)
   132         for s in sections:
   135         for s in sections:
   133             if s != 'config':
   136             if s != 'config':
   134                 print _(u'* Config section: »%s«') % s
   137                 print _(u'* Config section: »%s«') % s
   135             for opt, val in self.items(s):
   138             for opt, val in self.items(s):
   136                 newval = raw_input(
   139                 newval = raw_input(