tables.py: robustify repr
authorrgbecker
Thu, 23 Sep 2004 12:36:41 +0000
changeset 2389 174fe506bf48
parent 2388 5fa400f5d46b
child 2390 d46ae0ab7698
tables.py: robustify repr
reportlab/platypus/tables.py
--- a/reportlab/platypus/tables.py	Wed Sep 22 08:57:45 2004 +0000
+++ b/reportlab/platypus/tables.py	Thu Sep 23 12:36:41 2004 +0000
@@ -211,9 +211,9 @@
             self.setStyle(style)
     def __repr__(self):
         "incomplete, but better than nothing"
-        r = self._rowHeights
-        c = self._colWidths
-        cv = self._cellvalues
+        r = getattr(self,'_rowHeights','[unknown]')
+        c = getattr(self,'_colWidths','[unknown]')
+        cv = getattr(self,'_cellvalues','[unknown]')
         import pprint, string
         cv = pprint.pformat(cv)
         cv = string.replace(cv, "\n", "\n  ")