tableofcontents.py: try and allow for differecnt dot kinds py33
authorrobin
Tue, 11 Mar 2014 14:14:58 +0000
branchpy33
changeset 4058 a97a88afcfe8
parent 4057 ce0357e4acb3
child 4059 9b48d0d9f137
tableofcontents.py: try and allow for differecnt dot kinds
src/reportlab/platypus/tableofcontents.py
--- a/src/reportlab/platypus/tableofcontents.py	Tue Mar 11 12:08:38 2014 +0000
+++ b/src/reportlab/platypus/tableofcontents.py	Tue Mar 11 14:14:58 2014 +0000
@@ -46,7 +46,7 @@
 
 from reportlab.lib import enums
 from reportlab.lib.units import cm
-from reportlab.lib.utils import commasplit, escapeOnce, encode_label, decode_label
+from reportlab.lib.utils import commasplit, escapeOnce, encode_label, decode_label, strTypes
 from reportlab.lib.styles import ParagraphStyle, _baseFontName
 from reportlab.platypus.paragraph import Paragraph
 from reportlab.platypus.doctemplate import IndexingFlowable
@@ -92,7 +92,7 @@
         pagestrw = stringWidth(pagestr, style.fontName, fontSize)
         
     
-    if isinstance(dot, str):
+    if isinstance(dot, strTypes):
         if dot:
             dotw = stringWidth(dot, style.fontName, fontSize)
             dotsn = int((availWidth-x-pagestrw)/dotw)