crash with bibtex errors with no line number

Bug #1533723 reported by Emmanuel Beffara
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Rubber
Fix Released
Undecided
Unassigned

Bug Description

When bibtex reports an error with no line number, typically something like

  I found no \citation commands---while reading file foo.aux

rubber crashes:

  $ rubber -d foo.tex
  compiling foo.tex...
  running: bibtex foo.aux...
  [biblio] There were errors running bibtex.
  Traceback (most recent call last):
    File "/usr/local/bin/rubber", line 17, in <module>
      sys.exit (cmdline (args))
    File "/usr/local/lib/python2.7/site-packages/rubber/cmdline.py", line 432, in __call__
      self.main (cmdline)
    File "/usr/local/lib/python2.7/site-packages/rubber/cmdline.py", line 373, in main
      self.process_source (env)
    File "/usr/local/lib/python2.7/site-packages/rubber/cmdline.py", line 460, in process_source
      self.build (env)
    File "/usr/local/lib/python2.7/site-packages/rubber/cmdline.py", line 406, in build
      for err in env.final.failed().get_errors():
    File "/usr/local/lib/python2.7/site-packages/rubber/biblio.py", line 84, in get_errors
      line = int (m.group ("line"))
  TypeError: int() argument must be a string or a number, not 'NoneType'

because the regexp group "line" is undefined for this message. The attached patch fixes the issue.

Sebastian Kapfer (caci)
Changed in rubber:
status: New → In Progress
Revision history for this message
Emmanuel Beffara (manu-beffara) wrote :
Revision history for this message
Sebastian Kapfer (caci) wrote :

Committed a regression test. Thanks!

Changed in rubber:
milestone: none → 1.5
status: In Progress → Fix Committed
Changed in rubber:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.