From 5bbc2e1c24bf0495303756652ffc7980de2d5647 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Tue, 22 May 2012 16:38:58 +0000 Subject: [PATCH] 5718: crashes on startup svn: r19625 --- src/gen/utils/configmanager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gen/utils/configmanager.py b/src/gen/utils/configmanager.py index 9aaf129d3..427604e61 100644 --- a/src/gen/utils/configmanager.py +++ b/src/gen/utils/configmanager.py @@ -246,7 +246,12 @@ class ConfigManager(object): filename = self.filename if filename and os.path.exists(filename): parser = ConfigParser.RawConfigParser() - parser.read(filename) + try: # see bugs 5356, 5490, 5591, 5651, 5718, etc. + 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(): name = sec.lower() if name not in self.data: