dabo Commit
Revision 6457
Date: 2011-02-23 00:16:31 -0800 (Wed, 23 Feb 2011)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6457

Changed:
U   trunk/dabo/biz/dBizobj.py

Log:
Added exception for invalid DataStructure property value type.

Diff:
Modified: trunk/dabo/biz/dBizobj.py
===================================================================
--- trunk/dabo/biz/dBizobj.py   2011-02-22 17:25:06 UTC (rev 6456)
+++ trunk/dabo/biz/dBizobj.py   2011-02-23 08:16:31 UTC (rev 6457)
@@ -2327,6 +2327,9 @@
                return self._CurrentCursor.DataStructure
 
        def _setDataStructure(self, val):
+               if not isinstance(val, (types.NoneType, tuple)):
+                       raise TypeError(_("Invalid type '%s' for property 
DataStructure. " \
+                                       "An tuple value is required.") % 
type(val))
                for key, cursor in self.__cursors.items():
                        cursor.DataStructure = val
                self._dataStructure = 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]

Reply via email to