Author: tack
Date: Sun Oct 14 14:38:43 2007
New Revision: 2872

Log:
Raise exception when referencing an undefined attribute.  Indirectly fixes a
bug in which the pickle is replaced with an empty dictionary when updating
(solely) undefined attributes.


Modified:
   trunk/base/src/db.py

Modified: trunk/base/src/db.py
==============================================================================
--- trunk/base/src/db.py        (original)
+++ trunk/base/src/db.py        Sun Oct 14 14:38:43 2007
@@ -681,6 +681,9 @@
         for key in attrs.keys():
             if attrs[key] == None:
                 del attrs[key]
+            if key not in type_attrs:
+                raise ValueError, "Reference to undefined attribute '%s'" % key
+
         attrs_copy = attrs.copy()
         for name, (attr_type, flags, attr_ivtidx, attr_split) in 
type_attrs.items():
             if flags & ATTR_SEARCHABLE and name in attrs:

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to