]> git.lyx.org Git - features.git/commitdiff
* configure.py:
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 28 Feb 2011 16:15:03 +0000 (16:15 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 28 Feb 2011 16:15:03 +0000 (16:15 +0000)
- 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

index b8cd6e1f02004a03a367a711afc5d40d1c92631b..a64737be3b6c948b6cb4f038aa639abdae80f12e 100644 (file)
@@ -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: