Browse Source

pylint

pull/27/head
Louis 11 years ago
parent
commit
1ad284283a
  1. 1
      songbook
  2. 10
      songbook_core/build.py

1
songbook

@ -36,6 +36,7 @@ class ParseStepsAction(argparse.Action):
) )
class VerboseAction(argparse.Action): class VerboseAction(argparse.Action):
"""Set verbosity level with option --verbose."""
def __call__(self, *_args, **_kwargs): def __call__(self, *_args, **_kwargs):
LOGGER.setLevel(logging.DEBUG) LOGGER.setLevel(logging.DEBUG)

10
songbook_core/build.py

@ -230,20 +230,20 @@ class SongbookBuilder(object):
"""Build .pdf file from .tex file""" """Build .pdf file from .tex file"""
LOGGER.info("Building '{}.pdf'".format(self.basename)) LOGGER.info("Building '{}.pdf'".format(self.basename))
self._run_once(self._set_latex) self._run_once(self._set_latex)
p = Popen( process = Popen(
["pdflatex"] + self._pdflatex_options + [self.basename], ["pdflatex"] + self._pdflatex_options + [self.basename],
stdout=PIPE, stdout=PIPE,
stderr=PIPE) stderr=PIPE)
log = '' log = ''
line = p.stdout.readline() line = process.stdout.readline()
while line: while line:
log += line log += line
line = p.stdout.readline() line = process.stdout.readline()
LOGGER.debug(log) LOGGER.debug(log)
p.wait() process.wait()
if p.returncode: if process.returncode:
raise errors.LatexCompilationError(self.basename) raise errors.LatexCompilationError(self.basename)
def build_sbx(self): def build_sbx(self):

Loading…
Cancel
Save