Subject: [xml2rfc] #331 (Version 2 cli): exception from missing author for reference

From: "xml2rfc issue tracker" <[email-masked]>
Date: Thu, 23 Feb 2017 21:14:48 -0000

#331: exception from missing author for reference

 Traceback (most recent call last):
   File "/usr/local/bin/xml2rfc", line 9, in <module>
     load_entry_point('xml2rfc==2.5.2', 'console_scripts', 'xml2rfc')()
   File "/Library/Python/2.7/site-packages/xml2rfc/run.py", line 213, in
 main
     htmlwriter.write(filename)
   File "/Library/Python/2.7/site-packages/xml2rfc/writers/base.py", line
 1265, in write
     self._build_document()
   File "/Library/Python/2.7/site-packages/xml2rfc/writers/base.py", line
 1211, in _build_document
     self.write_reference_list(reference_list)
   File "/Library/Python/2.7/site-packages/xml2rfc/writers/html.py", line
 569, in write_reference_list
     a.tail = ', '
 UnboundLocalError: local variable 'a' referenced before assignment

 That was caused when trying to make an html file from an xml file that was
 generated by kramdown where I had normative and informative references
 that didn't have an associated author.  The .xml file had empty "<author>
 </author>".  The conversion to .txt succeeded without complaint.

 Independent of whether author is required for every reference, this could
 be handled more gracefully.  I've also filed a ticket against kramdown to
 look at whether having an author in the reference needs to be enforced.

-- 
---------------------------+----------------------------------
 Reporter:  [email-masked]    |      Owner:  [email-masked]
     Type:  defect         |     Status:  new
 Priority:  minor          |  Milestone:
Component:  Version 2 cli  |    Version:  2.4.x
 Keywords:                 |
---------------------------+----------------------------------

Ticket URL: <https://trac.tools.ietf.org/tools/xml2rfc/trac/ticket/331>
xml2rfc <http://tools.ietf.org/tools/xml2rfc/>