From 594179f3302d104daabcbc0a11cdfb2288505e31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 28 Feb 2011 16:15:03 +0000 Subject: [PATCH] * configure.py: - when a layout file has no valid \Declare line, issue a warning and skip this file instead of aborting the whole configuration process. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37807 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/configure.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index b8cd6e1f02..a64737be3b 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1068,17 +1068,21 @@ def checkLatexConfig(check_config, bool_docbook): testclasses = list() for file in glob.glob( os.path.join('layouts', '*.layout') ) + \ glob.glob( os.path.join(srcdir, 'layouts', '*.layout' ) ) : + nodeclaration = False if not os.path.isfile(file): continue classname = file.split(os.sep)[-1].split('.')[0] for line in open(file).readlines(): if not empty.match(line) and line[0] != '#': - logger.error("Failed to find \Declare line for layout file `" + file + "'") - sys.exit(3) + logger.warning("Failed to find valid \Declare line for layout file `" + file + "'.\n\t=> Skipping this file!") + nodeclaration = True + break if declare.search(line) == None: continue testclasses.append("\\TestDocClass{%s}{%s}" % (classname, line[1:].strip())) break + if nodeclaration: + continue testclasses.sort() cl = open('chklayouts.tex', 'w') for line in testclasses: -- 2.39.2