bugfix when no config file is present

This commit is contained in:
Yann Leboulanger 2005-02-26 23:16:42 +00:00
parent d6d205b9b2
commit 73cf85b57e
2 changed files with 1 additions and 2 deletions

View File

@ -297,13 +297,13 @@ class GajimCore:
fic = open(fname, "w")
fic.close()
self.cfgParser = common.optparser.OptionsParser(CONFPATH)
self.parse()
for part in default_tab.keys():
if not self.cfgParser.tab.has_key(part):
self.cfgParser.tab[part] = {}
for option in default_tab[part].keys():
if not self.cfgParser.tab[part].has_key(option):
self.cfgParser.tab[part][option] = default_tab[part][option]
self.parse()
# END init_cfg_file
def parse(self):

View File

@ -33,7 +33,6 @@ class OptionsParser:
print 'error cannot open file %s\n' % (self.__fname);
return
self.tab = {}
section = ''
for line in fd.readlines():
if line[0] in "#;":