dabo Commit
Revision 6459
Date: 2011-02-23 03:15:27 -0800 (Wed, 23 Feb 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6459
Changed:
U trunk/dabo/biz/dBizobj.py
Log:
Added list to tuple conversion to achieve compatibility with older code.
Although API always stated there should be a tuple value.
Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py 2011-02-23 08:17:25 UTC (rev 6458)
+++ trunk/dabo/biz/dBizobj.py 2011-02-23 11:15:27 UTC (rev 6459)
@@ -2327,6 +2327,11 @@
return self._CurrentCursor.DataStructure
def _setDataStructure(self, val):
+ # Although API clearly states there should be tuple type value,
+ # to achieve backward compatibility with older code,
+ # list are explicitly converted into tuples.
+ if isinstance(val, list):
+ val = tuple(val)
if not isinstance(val, (types.NoneType, tuple)):
raise TypeError(_("Invalid type '%s' for property
DataStructure. " \
"An tuple value is required.") %
type(val))
_______________________________________________
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]