dabo Commit
Revision 6000
Date: 2010-09-12 13:14:45 -0700 (Sun, 12 Sep 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6000
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
In some cases the regex for getType() will not return any matches, so the line
will raise an AttributeError instead of an IndexError. Changed the handler to
catch both types.
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2010-09-12 18:46:02 UTC (rev 5999)
+++ trunk/dabo/db/dCursorMixin.py 2010-09-12 20:14:45 UTC (rev 6000)
@@ -683,7 +683,7 @@
def getType(self, val):
try:
ret = re.search("type '([^']+)'",
ustr(type(val))).groups()[0]
- except IndexError:
+ except (IndexError, AttributeError):
ret = "-unknown-"
return ret
_______________________________________________
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]