dabo Commit
Revision 6346
Date: 2011-01-25 05:50:00 -0800 (Tue, 25 Jan 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6346

Changed:
U   trunk/ide/ClassDesigner.py

Log:
Fix the exception message attribute DeprecationWarning on Python 2.6.

Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py  2011-01-25 10:09:03 UTC (rev 6345)
+++ trunk/ide/ClassDesigner.py  2011-01-25 13:50:00 UTC (rev 6346)
@@ -1924,14 +1924,9 @@
                try:
                        self.CurrentForm.onRunDesign(evt)
                except AttributeError, e:
-                       dabo.ui.stop(_("Attribute Error: %s") % e.message, 
_("Attribute Error"))
+                       dabo.ui.stop(_("Attribute Error: %s") % ustr(e), 
_("Attribute Error"))
                except StandardError, e:
-                       if hasattr(e, "message"):
-                               msg = e.message
-                       elif hasattr(e, "msg"):
-                               msg = e.msg
-                       else:
-                               msg = _("<unspecified>")
+                       msg = ustr(e)
                        if hasattr(e, "text"):
                                txt = e.text.strip()
                        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