dabo Commit
Revision 4865
Date: 2008-12-17 11:12:49 -0800 (Wed, 17 Dec 2008)
Author: Paul
Trac: http://trac.dabodev.com/dabo/changeset/4865
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
Fixed reportwriter so if the image to draw is invalid or not found, we don't
get a reportlab traceback. Just display text in the report.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2008-12-17 19:11:12 UTC (rev 4864)
+++ trunk/dabo/lib/reportWriter.py 2008-12-17 19:12:49 UTC (rev 4865)
@@ -1143,7 +1143,10 @@
width, height = None, None
if img:
- c.drawImage(img, 0, 0, width, height, mask)
+ try:
+ c.drawImage(img, 0, 0, width, height,
mask)
+ except StandardError:
+ c.drawCentredString(0, 0, "<< Image
expr error >>")
elif objType == "BarGraph":
# Do these imports here so as not to require the huge
matplotlib unless
_______________________________________________
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]