Changeset bad459 in indico


Ignore:
Timestamp:
03/21/11 15:58:55 (2 years ago)
Author:
Adrian Moennich <jerome.ernst.monnich@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, d9941f8582b36b24821a11ea5ba16fda6a457fb1
Children:
5c5d1d
Parents:
65ce19
Message:

[FIX] Workaround for ParaLines? getitem error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/PDFinterface/base.py

    r9576e61 rbad459  
    218218        Draws row of dots from the end of the abstract title to the page number. 
    219219        """ 
    220         freeSpace = int(self.blPara.lines[-1][0]) 
     220        try: 
     221            freeSpace = int(self.blPara.lines[-1][0]) 
     222        except AttributeError: 
     223            # Sometimes we get an ABag instead of a tuple.. in this case we use the extraSpace attribute 
     224            # as it seems to contain just what we need. 
     225            freeSpace = int(self.blPara.lines[-1].extraSpace) 
    221226        while( freeSpace > 10 ): 
    222227            dot = self.beginText(self.width + 10 - freeSpace, self.style.leading - self.style.fontSize) 
Note: See TracChangeset for help on using the changeset viewer.