bugfix when no config file is present
This commit is contained in:
parent
d6d205b9b2
commit
73cf85b57e
|
@ -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):
|
||||
|
|
|
@ -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 "#;":
|
||||
|
|
Loading…
Reference in New Issue