From b26fc9ff62e16a37f56b2c9ecb8d8db49bfcf027 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Tue, 8 Feb 2011 00:10:19 +0000 Subject: [PATCH] Get rid of the global lyx2lyx variable. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37558 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/lyxpak.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/scripts/lyxpak.py b/lib/scripts/lyxpak.py index a47e2927e1..07737249fe 100755 --- a/lib/scripts/lyxpak.py +++ b/lib/scripts/lyxpak.py @@ -21,8 +21,6 @@ if sys.version_info < (2, 4, 0): from sets import Set as set from getopt import getopt -lyx2lyx = None - # Pre-compiled regular expressions. re_lyxfile = re.compile("\.lyx$") re_input = re.compile(r'^(.*)\\(input|include){(\s*)(\S+)(\s*)}.*$') @@ -79,7 +77,7 @@ def abspath(name): return newname -def gather_files(curfile, incfiles): +def gather_files(curfile, incfiles, lyx2lyx): " Recursively gather files." curdir = os.path.dirname(abspath(curfile)) is_lyxfile = re_lyxfile.search(curfile) @@ -221,7 +219,7 @@ def main(args): makezip = (os.name == 'nt') outdir = "" - global lyx2lyx + lyx2lyx = None for (opt, param) in options: if opt == "-h": @@ -272,7 +270,7 @@ def main(args): # Initialize the list with the specified LyX file and recursively # gather all required files (also from child documents). incfiles = [abspath(lyxfile)] - gather_files(lyxfile, incfiles) + gather_files(lyxfile, incfiles, lyx2lyx) # Find the topmost dir common to all files if len(incfiles) > 1: -- 2.39.5