From 73cf85b57e05be4d033f8b7f6ec2fa15431a18d9 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 26 Feb 2005 23:16:42 +0000 Subject: [PATCH] bugfix when no config file is present --- Core/core.py | 2 +- common/optparser.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Core/core.py b/Core/core.py index d8a70be48..9ba1b2690 100644 --- a/Core/core.py +++ b/Core/core.py @@ -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): diff --git a/common/optparser.py b/common/optparser.py index 38d88c0cc..924876753 100644 --- a/common/optparser.py +++ b/common/optparser.py @@ -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 "#;":