Subject: [xml2rfc] bug in XML2RFC AttributeError: 'list' object has no attribute 'strip'

From: Robin Raymond <[email-masked]>
Date: Mon, 24 Jun 2013 22:25:29 -0400

Traceback (most recent call last):
   File "/usr/local/bin/xml2rfc", line 224, in <module>
     main()
   File "/usr/local/bin/xml2rfc", line 209, in main
     pagedwriter.write(filename)
   File "/Library/Python/2.7/site-packages/xml2rfc/writers/base.py", 
line 1088, in write
     self.post_rendering()
   File 
"/Library/Python/2.7/site-packages/xml2rfc/writers/paginated_txt.py", 
line 288, in post_rendering
     self.emit([''] * remainder)
   File 
"/Library/Python/2.7/site-packages/xml2rfc/writers/paginated_txt.py", 
line 164, in emit
     if self.page_length == 1 and text.strip() == '':
AttributeError: 'list' object has no attribute 'strip'

     def emit(self, text):
         """Write text to the output buffer if it's not just a blank
            line at the top of the page"""
         if self.page_length == 1 and text.strip() == '':
             return
         if isinstance(text, basestring):
             self.output.append(text)
             self.page_length += 1
         elif isinstance(text, list):
             self.output.extend(text)
             self.page_length += len(text)
         else:
             raise TypeError("a string or a list of strings is required")

^^^ Fails in this routine where self.page_length == 1 and text is an 
array of [''] * 48

         # Write final footer
         remainder = max_page_length - self.page_length - 2
         print remainder
         print [''] * remainder
         self.emit([''] * remainder)
         self.page_break(final=True)

Called from above ^^^^^^^^^ with remainder == 48

-Robin