Minor code reorganization.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34526 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-05-27 15:16:23 +00:00
parent 25e960b8fd
commit 434af7df28

View File

@ -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():