From 434af7df28094095f85f42888d894a9d24aaa0c1 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 27 May 2010 15:16:23 +0000 Subject: [PATCH] Minor code reorganization. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34526 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/configure.py | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index 807d90b37f..080e5f8207 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -1139,26 +1139,29 @@ def processModuleFile(file, bool_docbook): if res != None: catgy = res.group(1) continue - if modname != "": - if pkgs != "": - # this module has some latex dependencies: - # append the dependencies to chkmodules.tex, - # which is \input'ed by chkconfig.ltx - testpackages = list() - for pkg in pkgs.split(","): - if "->" in pkg: - # this is a converter dependency: skip - continue - if pkg.endswith(".sty"): - pkg = pkg[:-4] - testpackages.append("\\TestPackage{%s}" % (pkg,)) - cm = open('chkmodules.tex', 'a') - for line in testpackages: - cm.write(line + '\n') - cm.close() - return '"%s" "%s" "%s" "%s" "%s" "%s" "%s"\n' % (modname, filename, desc, pkgs, req, excl, catgy) - logger.warning("Module file without \DeclareLyXModule line. ") - return "" + + if modname == "": + logger.warning("Module file without \DeclareLyXModule line. ") + return "" + + if pkgs != "": + # this module has some latex dependencies: + # append the dependencies to chkmodules.tex, + # which is \input'ed by chkconfig.ltx + testpackages = list() + for pkg in pkgs.split(","): + if "->" in pkg: + # this is a converter dependency: skip + continue + if pkg.endswith(".sty"): + pkg = pkg[:-4] + testpackages.append("\\TestPackage{%s}" % (pkg,)) + cm = open('chkmodules.tex', 'a') + for line in testpackages: + cm.write(line + '\n') + cm.close() + return '"%s" "%s" "%s" "%s" "%s" "%s" "%s"\n' % (modname, filename, desc, pkgs, req, excl, catgy) + def checkTeXAllowSpaces(): -- 2.39.2