dabo Commit
Revision 6125
Date: 2010-10-21 15:54:16 -0700 (Thu, 21 Oct 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/6125
Changed:
U trunk/dabo/lib/utils.py
Log:
Fixed the check for args to also check for the empty tuple, which happens in
python 2.5.
Thanks Jacek.
Diff:
Modified: trunk/dabo/lib/utils.py
===================================================================
--- trunk/dabo/lib/utils.py 2010-10-21 22:45:01 UTC (rev 6124)
+++ trunk/dabo/lib/utils.py 2010-10-21 22:54:16 UTC (rev 6125)
@@ -182,7 +182,7 @@
# Handle DBQueryException first.
if hasattr(e, "err_desc"):
return ustr(e.err_desc)
- if hasattr(e, "args"):
+ if hasattr(e, "args") and e.args:
return "\n".join((ustr(a) for a in e.args))
if hasattr(e, "message"):
# message is deprecated in python 2.6
_______________________________________________
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]