From b940dc2db763444c3ee1cc004a986a4b555e345c Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 23 Oct 2008 15:30:17 +0000 Subject: [PATCH] Configure shouldn't abort just because it encounters an error reading a layout file. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27057 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/configure.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 0a877cdf55..3e648819e3 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -628,9 +628,9 @@ def processLayoutFile(file, bool_docbook): opt = classname return '"%s" "%s" "%s" "%s"\n' % (classname, opt, desc, avai) print "Layout file " + file + " has no \DeclareXXClass line. " - sys.exit(2) + return "" + - def checkLatexConfig(check_config, bool_docbook): ''' Explore the LaTeX configuration Return None (will be passed to sys.exit()) for success. @@ -670,7 +670,9 @@ def checkLatexConfig(check_config, bool_docbook): # make sure the same class is not considered twice if foundClasses.count(cleanclass) == 0: # not found before foundClasses.append(cleanclass) - tx.write(processLayoutFile(file, bool_docbook)) + retval = processLayoutFile(file, bool_docbook) + if retval != "": + tx.write(retval) tx.close() print '\tdone' if not check_config: @@ -762,7 +764,9 @@ def checkModulesConfig(): print file if not os.path.isfile(file): continue - tx.write(processModuleFile(file, bool_docbook)) + retval = processModuleFile(file, bool_docbook) + if retval != "": + tx.write(retval) tx.close() print '\tdone' @@ -830,7 +834,7 @@ def processModuleFile(file, bool_docbook): if modname != "": return '"%s" "%s" "%s" "%s" "%s" "%s"\n' % (modname, filename, desc, pkgs, req, excl) print "Module file without \DeclareLyXModule line. " - sys.exit(2) + return "" def checkTeXAllowSpaces(): -- 2.39.2