dabo Commit
Revision 5488
Date: 2009-10-23 15:48:37 -0700 (Fri, 23 Oct 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5488

Changed:
U   trunk/dabo/lib/reportWriter.py

Log:
I think this fixes the problem Larry saw earlier this week. I just got a 
KeyError
on "ReprintHeadersOnNewPage". This is because this isn't a required property 
(why
clutter the rfxml with it if it isn't set) so it doesn't necessarily exist in 
the
dict. The solution is to use dict.get() with a default value.



Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2009-10-23 22:06:02 UTC (rev 5487)
+++ trunk/dabo/lib/reportWriter.py      2009-10-23 22:48:37 UTC (rev 5488)
@@ -1877,7 +1877,7 @@
                                        maxBandHeight = getTotalBandHeight()
                                        
                                        if band == "groupHeader":
-                                               if headers_reprinted and 
bandDict["ReprintHeaderOnNewPage"]:
+                                               if headers_reprinted and 
bandDict.get("ReprintHeaderOnNewPage", False):
                                                        # This header was 
reprinted above; return now to avoid dupe.
                                                        return y
                                                else:




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to