dabo Commit
Revision 6945
Date: 2011-10-27 17:11:52 -0700 (Thu, 27 Oct 2011)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6945
Changed:
U trunk/dabo/lib/reportWriter.py
Log:
Images that don't evaluate at design-time would cause an exception, not
allowing the report to be edited. This fixes it.
Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py 2011-10-27 23:24:01 UTC (rev 6944)
+++ trunk/dabo/lib/reportWriter.py 2011-10-28 00:11:52 UTC (rev 6945)
@@ -1681,6 +1681,9 @@
c.clipPath(p, stroke=stroke)
img = obj.getProp("expr")
+ if isinstance(img, Exception):
+ img = None
+
if img is None:
pass
elif isinstance(img, basestring) and "\0" not in img:
@@ -1715,6 +1718,8 @@
c.drawImage(img, 0, 0, width, height,
mask, preserveAspectRatio=preserveRatio)
except StandardError:
c.drawCentredString(0, 0, "<< Image
expr error >>")
+ else:
+ c.drawCentredString(0, 0, obj["expr"])
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]