fix makeindex being called at the wrong moment with wrong arguments (closes: #82702)

the test was inverted

authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
changeseta3cece728832
branchdefault
phasepublic
hiddenno
parent revision#6af47c546dc2 Added the ability to insert a page break when a ".. page break" comment is
child revision#b4b0ffb84589 [mkfor] add "exos" target and make it possible to specify built targets as cmd line arguments
files modified by this revision
pdftex.py
# HG changeset patch
# User Alexandre Fayolle <alexandre.fayolle@logilab.fr>
# Date 1320934323 -3600
# Thu Nov 10 15:12:03 2011 +0100
# Node ID a3cece72883252a4fd28a414fbec51ce20f773e9
# Parent 6af47c546dc2b7289baa596556a89e4b96fe7c6d
fix makeindex being called at the wrong moment with wrong arguments (closes: #82702)

the test was inverted

diff --git a/pdftex.py b/pdftex.py
@@ -29,15 +29,12 @@
1              bar_finish(bar)
2 
3      def _run(self, name, bar, indexfile=None):
4          if bar:
5              bar.refresh()
6 -        if indexfile is None:
7 -            proc = subprocess.call('makeindex %s' % indexfile, shell=True,
8 -                                   bufsize=1,
9 -                                   stdout=subprocess.PIPE,
10 -                                   stderr=subprocess.PIPE)
11 +        if indexfile is not None:
12 +            proc = subprocess.call('makeindex %s' % indexfile, shell=True)
13          cmd = 'TEXINPUTS=%s pdflatex %s %s.tex' % (':'.join(self._texinputs), self._flags, name)
14          rerun = False
15          proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1)
16          errors_log = []
17          append_error = False