Author: tack
Date: Tue Oct 25 19:28:44 2005
New Revision: 879
Modified:
trunk/base/src/base/db.py
Log:
Raise exception when registering object type with no keywords or attributes
specified.
Modified: trunk/base/src/base/db.py
==============================================================================
--- trunk/base/src/base/db.py (original)
+++ trunk/base/src/base/db.py Tue Oct 25 19:28:44 2005
@@ -245,6 +245,9 @@
def register_object_type_attrs(self, type_name, indexes = [], **attrs):
+ if len(indexes) == len(attrs) == 0:
+ raise ValueError, "Must specify indexes or attributes for object
type"
+
table_name = "objects_%s" % type_name
if type_name in self._object_types:
# This type already exists. Compare given attributes with
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog