tables.py: fix for case when minWidth fails du eot attribute error
authorrgbecker
Wed, 23 Mar 2005 11:35:10 +0000
changeset 2470 74a7b9da41e4
parent 2469 a2c99a719070
child 2471 76c745e075b2
tables.py: fix for case when minWidth fails du eot attribute error
reportlab/platypus/tables.py
--- a/reportlab/platypus/tables.py	Fri Mar 18 18:51:22 2005 +0000
+++ b/reportlab/platypus/tables.py	Wed Mar 23 11:35:10 2005 +0000
@@ -372,7 +372,11 @@
         # Even if something is fixedWidth, the attribute to check is not
         # necessarily consistent (cf. Image.drawWidth).  Therefore, we'll
         # be extra-careful and fall through to this code if necessary.
-        if hasattr(v, 'minWidth'): return v.minWidth() # should be all flowables
+        if hasattr(v, 'minWidth'):
+            try:
+                return v.minWidth() # should be all flowables
+            except AttributeError:
+                pass
         if t is not StringType: v = v is not None and str(v) or ''
         v = string.split(v, "\n")
         return max(map(lambda a, b=s.fontname, c=s.fontsize,d=pdfmetrics.stringWidth: d(a,b,c), v))