5718: crashes on startup

svn: r19625
This commit is contained in:
Paul Franklin 2012-05-22 16:38:58 +00:00
parent 741467ef33
commit 5bbc2e1c24

View File

@ -246,7 +246,12 @@ class ConfigManager(object):
filename = self.filename filename = self.filename
if filename and os.path.exists(filename): if filename and os.path.exists(filename):
parser = ConfigParser.RawConfigParser() parser = ConfigParser.RawConfigParser()
try: # see bugs 5356, 5490, 5591, 5651, 5718, etc.
parser.read(filename) parser.read(filename)
except:
msg1 = _("WARNING: could not parse file, recreating it:\n%s")
print >> sys.stderr, msg1 % filename
return
for sec in parser.sections(): for sec in parser.sections():
name = sec.lower() name = sec.lower()
if name not in self.data: if name not in self.data: