Fix bug reported on user list: the path variable here was undefined,

causing a failure when running outside the user tree. This was my
fault: when I refactored this routine, I failed to note that this
variable was now undefined.
This commit is contained in:
Richard Heck 2012-11-27 20:50:09 -05:00
parent 89be706c8f
commit 72c2a72afd

View File

@ -174,7 +174,7 @@ def gather_files(curfile, incfiles, lyx2lyx):
return 0 return 0
def find_lyx2lyx(progloc): def find_lyx2lyx(progloc, path):
" Find a usable version of the lyx2lyx script. " " Find a usable version of the lyx2lyx script. "
# first we will see if the script is roughly where we are # first we will see if the script is roughly where we are
# i.e., we will assume we are in $SOMEDIR/scripts and look # i.e., we will assume we are in $SOMEDIR/scripts and look
@ -275,7 +275,7 @@ def main(args):
path = string.split(os.environ["PATH"], os.pathsep) path = string.split(os.environ["PATH"], os.pathsep)
if lyx2lyx == None: if lyx2lyx == None:
lyx2lyx = find_lyx2lyx(ourprog) lyx2lyx = find_lyx2lyx(ourprog, path)
# Initialize the list with the specified LyX file and recursively # Initialize the list with the specified LyX file and recursively
# gather all required files (also from child documents). # gather all required files (also from child documents).