frames.py: fix occasional bad traceback bug
authorrgbecker
Wed, 22 Oct 2008 12:18:53 +0000
changeset 3010 1a6fc2f5876a
parent 3009 71ae9bbac9fb
child 3011 02e06a27963b
frames.py: fix occasional bad traceback bug
src/reportlab/platypus/frames.py
--- a/src/reportlab/platypus/frames.py	Thu Oct 16 12:56:05 2008 +0000
+++ b/src/reportlab/platypus/frames.py	Wed Oct 22 12:18:53 2008 +0000
@@ -181,7 +181,10 @@
                 self._y = y
                 return 1
         finally:
-            del flowable.canv, flowable._frame
+            #sometimes canv/_frame aren't still on the flowable
+            for a in ('canv', '_frame'):
+                if hasattr(flowable,a):
+                    delattr(flowable,a)
 
     add = _add