Make titlegen.py edible by older pythons
authorAlpar Juttner <alpar@cs.elte.hu>
Sat, 01 Nov 2008 08:07:55 +0000
changeset 1398a495a50e49
parent 12 d64ffbd7d8c6
child 14 35279d53a015
Make titlegen.py edible by older pythons
titlegen.py
     1.1 --- a/titlegen.py	Fri Oct 31 21:00:25 2008 +0000
     1.2 +++ b/titlegen.py	Sat Nov 01 08:07:55 2008 +0000
     1.3 @@ -56,9 +56,15 @@
     1.4                                                 format_sec(ind[sec][0]),gr[4]))
     1.5              elif gr[2]:
     1.6                  prev_page=ind[page][1]
     1.7 -                prev_str= ( '\\ref '+prev_page ) if prev_page else ''
     1.8 +                if prev_page:
     1.9 +                    prev_str= ( '\\ref '+prev_page )
    1.10 +                else:
    1.11 +                    prev_str=''
    1.12                  next_page=ind[page][2]
    1.13 -                next_str= ( '\\ref '+next_page ) if next_page else ''
    1.14 +                if next_page:
    1.15 +                    next_str= ( '\\ref '+next_page )
    1.16 +                else:
    1.17 +                    next_str=''
    1.18                  fo.write('<< %s | \\ref toc "Home" | %s >>\n'%\
    1.19                               (prev_str,next_str))
    1.20              elif gr[3]: